Go Back   vBulletin Modification Discussions > Coding Discussions > PHP Discussions, Tutorials and Help
Home Register FAQ Members List Calendar Mark Forums Read
vBSEO Info Tags

About This Page: This is a discussion on Sql Masters problem here within the PHP Discussions, Tutorials and Help forums, part of the Coding Discussions category, at vBulletin Modification Discussions. Database error in vBulletin 3.6.4: Invalid SQL: SELECT COUNT(*) AS threads, SUM(IF(thread.lastpost > 12:45 AM, 16-04-2007 AND open <> 10, 1, 0)) AS newthread FROM thread AS thread WHERE forumid = 129


Reply
 
LinkBack Thread Tools
Old 04-15-2007, 01:09 PM   #1 (permalink)
Junior Member
 
Join Date: Apr 2007
Posts: 1
asus is on a distinguished road
iTrader: (0)
Red face Sql Masters problem here

Database error in vBulletin 3.6.4:

Invalid SQL:

SELECT COUNT(*) AS threads, SUM(IF(thread.lastpost > 12:45 AM, 16-04-2007 AND open <> 10, 1, 0)) AS newthread

FROM thread AS thread


WHERE forumid = 129
AND sticky = 0
AND visible IN (0,1,2);

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':45 AM, 16-04-2007 AND open <> 10, 1, 0)) AS newthread

FROM thread AS threa' at line 1
Error Number : 1064


can anyone help in this matter
asus is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links

Old 04-15-2007, 02:04 PM   #2 (permalink)
Administrator
 
Code Monkey's Avatar
 
Join Date: May 2006
Posts: 2,216
Code Monkey is on a distinguished road
iTrader: (0)
Is this a custom script?
__________________
Please do not PM me unless it's personal. General vBulletin or mod questions by PM will be ignored.

Try the vBSEO Demo

Click here for Instant Community
Code Monkey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 07-13-2007, 08:00 AM   #3 (permalink)
Banned
 
Join Date: Jun 2007
Location: MSK-RU
Posts: 6
Makc666 is on a distinguished road
iTrader: (0)
Re: Sql Masters problem here

Quote:
Originally Posted by asus View Post
Database error in vBulletin 3.6.4:

Invalid SQL:

SELECT COUNT(*) AS threads, SUM(IF(thread.lastpost > 12:45 AM, 16-04-2007 AND open <> 10, 1, 0)) AS newthread

FROM thread AS thread


WHERE forumid = 129
AND sticky = 0
AND visible IN (0,1,2);

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ':45 AM, 16-04-2007 AND open <> 10, 1, 0)) AS newthread

FROM thread AS threa' at line 1
Error Number : 1064


can anyone help in this matter
thread.lastpost > 12:45 AM, 16-04-2007 AND open <> 10, 1, 0
this one is not right.

time in thread.lastpost is storied on UNIX format (Date/Epoch).
Also <> 10, 1, 0 is not right also. it can't be so.

it must look like:
thread.lastpost > 1176713100 AND open = 10 AND open = 0 AND open = 1

To get UNIX time you can use:
Date/Epoch Converter
Date/Epoch Time Converter - JavaScript Utilities/Tools - ESQSoft
Makc666 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply
Tags: ,





Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


A vBSkinworks Design Recoded By vBModder.
All Code Distributed On This Site is © 2006 by it's author.
Search Engine Optimization by vBSEO 3.1.0

All times are GMT -7. The time now is 10:55 PM.
Online Users 35
Registered 0
Guests 35
Members 3607
Active Members 181
Threads 1730
Posts 7191
Top poster: Code Monkey (2216)
Welcome to our newest member, iphone3g
Most users ever online was 235, 04-11-2007 at 08:59 AM.
Speak Out! vBulletin gets the web talking!


vBulletin Setup SEO

vBulletin graphics resource images