Page 1 of 2

SQL ERROR

Posted: 4. September 2008 19:54
by Scary
Your phpBB Version: 3.0.2
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Beginner

What have you done before the problem was there?


What have you already tryed to solve the problem?


Description and Message
i got this error

Code: Select all

SQL ERROR [ mysql4 ]

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 'AND in_message = 0 ORDER BY filetime DESC' at line 4 [1064]

SQL

SELECT * FROM phpbb_attachments WHERE `post_msg_id` = AND in_message = 0 ORDER BY filetime DESC

BACKTRACE

FILE: includes/db/mysql.php
LINE: 158
CALL: dbal->sql_error()

FILE: portal/includes/functions.php
LINE: 283
CALL: dbal_mysql->sql_query()

FILE: portal/block/news.php
LINE: 30
CALL: phpbb_fetch_posts()

FILE: portal.php
LINE: 115
CALL: include('portal/block/news.php')
Can any help,sorry may bad ingles

Greets
Scary[/i]

Re: SQL ERROR

Posted: 4. September 2008 19:59
by Kevin
Link to your form?

Re: SQL ERROR

Posted: 4. September 2008 20:24
by Scary
Hi!
I try in LOCALHOST, before i change to my main forum, i've a phpbb3 1.2.2 portal instaled, but i want yours!
That error only appears when i select "no" in the "compact news block style" on the "acp"

Danke!

Gruß
Scary

Re: SQL ERROR

Posted: 4. September 2008 20:25
by Kevin
Scary wrote:i've a phpbb3 1.2.2 portal instaled
With which portal do you receive this error? With the phpbb3 1.2.2 portal or ours?

Re: SQL ERROR

Posted: 4. September 2008 20:37
by Scary
i've already put yours. And everything's fine...
except that error when I select "no" in the "compact news block style" on the "acp"

Gruß
Scary

Re: SQL ERROR

Posted: 21. December 2008 12:58
by Scary
Can any help,sorry may bad ingles

Code: Select all

SQL ERROR [ mysql4 ]

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 'AND in_message = 0 ORDER BY filetime DESC' at line 4 [1064]

SQL

SELECT * FROM phpbb_attachments WHERE post_msg_id = AND in_message = 0 ORDER BY filetime DESC

BACKTRACE

FILE: includes/db/mysql.php
LINE: 174
CALL: dbal->sql_error()

FILE: portal/includes/functions.php
LINE: 283
CALL: dbal_mysql->sql_query()

FILE: portal/block/news.php
LINE: 30
CALL: phpbb_fetch_posts()

FILE: portal.php
LINE: 115
CALL: include('portal/block/news.php')
my forum test is http://www.scarymule.com/ftestes/portal.php


Greets
Scary

Re: SQL ERROR

Posted: 21. December 2008 13:48
by Kevin
Already solved? I dont see no error on your site.

Re: SQL ERROR

Posted: 21. December 2008 13:55
by Scary
Kevin wrote:Already solved? I dont see no error on your site.
not solved the link is http://www.scarymule.com/ftestes/portal.php not http://www.scarymule.com/ftestes/

Gruß
Scary

Re: SQL ERROR

Posted: 21. December 2008 13:58
by Kevin
Still no error. :?
Do receive this error as a guest too?

Re: SQL ERROR

Posted: 21. December 2008 14:44
by Scary
Kevin wrote:Still no error. :?
Do receive this error as a guest too?
as a guest, i don't receive an error, only logged...

sorry a double post

Re: SQL ERROR

Posted: 25. December 2008 12:20
by Scary
please ,can any help! :cry: :cry:

Re: SQL ERROR

Posted: 25. December 2008 14:35
by Kevin
A test account would be helpful, as the error doesn't occur for guests.
Sorry for the limited support, but i'm not at home, i'm in holidays. ;)

Re: SQL ERROR

Posted: 27. December 2008 20:26
by Scary
test account is:

user=test
password=123456

thanks

Re: SQL ERROR

Posted: 27. December 2008 21:09
by Scary
this error only appears if I have the attach active in ACP -> General -> Board Configuration -> Attachment settings -> Attachment display order, if I deactivate, the error doesn't appear.

greet

Cumps

Re: SQL ERROR

Posted: 5. January 2009 16:49
by Ice
Seems the error is caused by a missing id.

Open /portal/includes/functions.php
Find

Code: Select all

		if( $config['allow_attachments'] )
Replace with

Code: Select all

		if( $config['allow_attachments'] && $row['post_id'] )