SQL ERROR

Current Version: 1.0.6
Released: 09.01.10
Forum rules
Before creating a new support thread, please take a look in the board3 Portal FAQ and use the search!
Many questions have already been answered.

Topic author
Scary
Active Member
Posts: 10
Joined: 4. September 2008 19:44

SQL ERROR

Post 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]
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: SQL ERROR

Post by Kevin »

Link to your form?
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

Topic author
Scary
Active Member
Posts: 10
Joined: 4. September 2008 19:44

Re: SQL ERROR

Post 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
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: SQL ERROR

Post 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?
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

Topic author
Scary
Active Member
Posts: 10
Joined: 4. September 2008 19:44

Re: SQL ERROR

Post 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

Topic author
Scary
Active Member
Posts: 10
Joined: 4. September 2008 19:44

Re: SQL ERROR

Post 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
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: SQL ERROR

Post by Kevin »

Already solved? I dont see no error on your site.
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

Topic author
Scary
Active Member
Posts: 10
Joined: 4. September 2008 19:44

Re: SQL ERROR

Post 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
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: SQL ERROR

Post by Kevin »

Still no error. :?
Do receive this error as a guest too?
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

Topic author
Scary
Active Member
Posts: 10
Joined: 4. September 2008 19:44

Re: SQL ERROR

Post 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

Topic author
Scary
Active Member
Posts: 10
Joined: 4. September 2008 19:44

Re: SQL ERROR

Post by Scary »

please ,can any help! :cry: :cry:
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: SQL ERROR

Post 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. ;)
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

Topic author
Scary
Active Member
Posts: 10
Joined: 4. September 2008 19:44

Re: SQL ERROR

Post by Scary »

test account is:

user=test
password=123456

thanks

Topic author
Scary
Active Member
Posts: 10
Joined: 4. September 2008 19:44

Re: SQL ERROR

Post 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
User avatar

Ice
Former Team Member
Posts: 359
Joined: 20. January 2008 23:43
Location: England, United Kingdom

Re: SQL ERROR

Post 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'] )
Board3 Portal Dev & English Tech Support
Locked

Return to “board3 Portal 1.0.x - English Support”