Re: PHP/MySQL syntax problems

The login you provided isn't working

Re: PHP/MySQL syntax problems

Peter wrote:
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?

FluxBB - v1.4.8

Re: PHP/MySQL syntax problems

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)

Re: PHP/MySQL syntax problems

Peter wrote:

An error was encountered
File: /home/mysite/public_html/forum/edit.php
Line: 28

PunBB 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.

FluxBB - v1.4.8

30 (edited by Peter 2007-03-16 21:09)

Re: PHP/MySQL syntax problems

Smartys wrote:

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. smile