MySQL Errors

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Scam Warning
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
kcin1
Registered User
Posts: 6
Joined: Mon Apr 20, 2009 5:40 pm

MySQL Errors

Post by kcin1 »

Hiya,

I've not made any changes to my site for a while but since this afternoon I keep getting this message when I view the portal page:

Code: Select all

General Error
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')
Any chance someone knows what could of gone wrong?

Thanks for any help

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51214
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: MySQL Errors

Post by stevemaury »

Please fill out the Support Request Template.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

kcin1
Registered User
Posts: 6
Joined: Mon Apr 20, 2009 5:40 pm

Re: MySQL Errors

Post by kcin1 »

done, sorry for not doing it the first time.

Support Request Template
What version of phpBB are you using? phpBB 3.0.4
What is your board's URL? http://www.batracerunlimited.com
Who do you host your board with? not sure
How did you install your board? I used the download package from phpBB.com
Is your board a fresh install or a conversion? Fresh Install
Do you have any MODs installed? Yes
What MODs do you have installed? phpBB Gallery 0.4.1 Board3 Portal Version v1.0.2 Medal System MOD for phpBB3 phpBB3 Arcade 1.0.RC1
Please describe your problem.I was getting mySQL errors when viewing the portal page but after playing about with the php file I have now found out the problem, there is a topic listed on the recent topics section on the portal page but it doesn't exist and creates the error message. Is there a way to delete this topic ? But one thing is very strange is that it does not use english letters, this is the topic title: "Интернет магазин автозапчасти доставка."
What styles do you currently have installed? A custom one
What language(s) is your board currently using? English
Which database type/version are you using? I Don't Know
What is your level of experience? New to PHP and phpBB
Generated by SRT Generator ($Rev: 2931 $)

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51214
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: MySQL Errors

Post by stevemaury »

Your host is GoDaddy.

Nick, run this SQL query:

Code: Select all

SELECT `topic_first_poster_name` FROM phpbb_topics WHERE `topic_id` = 2195;
Then, once you have the username, in the ACP delete that user and all his posts.

If your table prefix is NOT phpbb_, change accordingly. If you do not know how to run a query, see http://www.phpbb.com/kb/article/executi ... hpmyadmin/
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

kcin1
Registered User
Posts: 6
Joined: Mon Apr 20, 2009 5:40 pm

Re: MySQL Errors

Post by kcin1 »

The query worked and it found the user, but I deleted all their posts but the topic is still their on the portal page. :(

kcin1
Registered User
Posts: 6
Joined: Mon Apr 20, 2009 5:40 pm

Re: MySQL Errors

Post by kcin1 »

Fixed it, I just deleted the record from the topic database in phpmyadmin. :)

Thanks for your help Steve! :)

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51214
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: MySQL Errors

Post by stevemaury »

I was trying to avoid that, as deleting stuf from the database can be risky. But if you are happy, I'm happy.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

kcin1
Registered User
Posts: 6
Joined: Mon Apr 20, 2009 5:40 pm

Re: MySQL Errors

Post by kcin1 »

I didn't know it was that risky, but I made a backup copy before I did it just to make sure if something bad happened I could fix. ;)

As you've been so helpful, do you mind if I ask something else? On the board index page one of my members, Shaun95, has their name in blue, but on every other page their name is green like it should be. Any idea whats causing the problem ? :)

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 51214
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: MySQL Errors

Post by stevemaury »

shaun is a member of at least two groups. Which is his default group, Global moderators or clansmen?
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

kcin1
Registered User
Posts: 6
Joined: Mon Apr 20, 2009 5:40 pm

Re: MySQL Errors

Post by kcin1 »

The default group is Global Moderators.

I even removed him from the clansman group, which is the one with the blue color and the name stayed blue on the index page! :S

Locked

Return to “[3.0.x] Support Forum”