Re: PHP/MySQL syntax problems
The login you provided isn't working
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 troubleshooting → PHP/MySQL syntax problems
The login you provided isn't working
lie2815 wrote:I guess, but I don't know. I guess there is something wrong with the ORDER BY statement
Any suggestions how to fix it?
I don't know, do you have to do the ascending/descending?
Your admin_options.php page is broken because of moving the file: you need to correct the issues with it (which should then allow you to correct the issue with division by zero)
An error was encountered
File: /home/mysite/public_html/forum/edit.php
Line: 28PunBB reported: Unable to fetch post info
Database reported: 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 'ORDER BY posted' at line 1 (Errno: 1064)
Failed query: SELECT id FROM posts WHERE topic_id= ORDER BY posted
I think the last line is wrong. You have SELECT id FROM posts WHERE topic_id= ?????????
So, there (wherever this query line is located in your file) you have to set topic_id equal to something. The error message seems to say the same thing ("...right syntax to use near 'ORDER BY posted'...", which is right behind the topic_id stuff.
Maybe you could post the block of your edit.php file.
Your admin_options.php page is broken because of moving the file: you need to correct the issues with it (which should then allow you to correct the issue with division by zero)
Damn. Thanks! That was it. I had removed the styles folder because I'm not using it elsewhere. Weird chain reaction.
So there doesn't seem to be a php syntax error in that line after all, lie2815, despite what debug said. Thanks though!!
Anyway, I think all the php code in my site now essentially works. Now I can move on to layout and content etc.
PunBB Forums → PunBB 1.2 troubleshooting → PHP/MySQL syntax problems
Powered by PunBB, supported by Informer Technologies, Inc.