How do i fix this database error?

Query: SELECT max(score) from gz_activity where (uid=0 or uid2=0) and gameid= Mysql error: 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 '' at line 1 Found error in the file '/home/rangers/public_html/gamezone/includes/site_functions.php' at line 412. Called 'db_value' function with erroneous argument #0.
MY SITES http://viptopia.net general social networking | http://www.rangerschat.com/ niche site
Quote · 1 Mar 2014

As long as there's something after that equals sign, I see nothing wrong with it.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 1 Mar 2014

You will have to dig into the code to see how the query is being formed; to see what is tripping it up.

I had a module that would throw a database error if the title of the content the module was reporting contained an apostrophe.  Apostrophes are used in query strings as you know HL, so the module developer had to escape the apostrophe in the title first before forming the query.  Once that was taken care of, the database errors stopped.

Geeks, making the world a better place
Quote · 1 Mar 2014

If this is from a module you purchased, then send the error message to the developer to see if they can find the issue and fix it.

Geeks, making the world a better place
Quote · 1 Mar 2014

Is that GameZone?

http://towtalk.net ... Hosted by Zarconia.net!
Quote · 1 Mar 2014

The complete line of code in site_functions.php is this:

$mypr = db_value("SELECT max(score) from gz_activity where (uid=$cid or uid2=$cid) and gameid=$gameid");

I will say again, I see nothing wrong with it.  GG, of course, will have her two cents to add.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 1 Mar 2014

 

The complete line of code in site_functions.php is this:

$mypr = db_value("SELECT max(score) from gz_activity where (uid=$cid or uid2=$cid) and gameid=$gameid");

I will say again, I see nothing wrong with it.  GG, of course, will have her two cents to add.

I think you missed the f***ing point you bleeding ....  The query string might be perfectly fine but it is the bleeding variables that may be tripping it up when they get converted out; just like what was happening in the incident I reported.  When the $title got written out to "Don't You Think" that apostrophe then was added into the query and mySQL thought it was indicating part of the query and not text.   Stop being an arse sometime HL, you might actually find you like it.  

Geeks, making the world a better place
Quote · 1 Mar 2014

 

I will say again, I see nothing wrong with it.  GG, of course, will have her two cents to add.

All that was needed here was "I will say again, I see nothing wrong with it" full stop.  Then if you were curious as to what I may have to add, you could have said, "GG, what do you see wrong with it?"

Geeks, making the world a better place
Quote · 1 Mar 2014

Well... at least I don't supplement all of my posts with a bunch of useless babble.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 1 Mar 2014

Kids don't fight....Foot in Mouth

so much to do....
Quote · 1 Mar 2014

 

Is that GameZone?

 yes it is the games module, it errors anytime someone plays a game, like it is an issues saving the score or something but everything looks to me functioning ok, it has been like this from a while I am just tired of seeing the emails.

MY SITES http://viptopia.net general social networking | http://www.rangerschat.com/ niche site
Quote · 2 Mar 2014

 

Well... at least I don't supplement all of my posts with a bunch of useless babble.

 some people find total post count to be important and some sort of status symbol,, and to some people like you, newt, a few others and myself find it quite annoying, trust me many of us have had the conversation more then a few times already..  will just be happy when the total count being shot for is achieved and certain things slow down Wink

MY SITES http://viptopia.net general social networking | http://www.rangerschat.com/ niche site
Quote · 2 Mar 2014

Fight! Fight! fight! I am enjoying this... Fight, fight, fight!

Quote · 2 Mar 2014

print "id=".$gameid;

="" || ="xx" ?

http://boonexpert.com
Quote · 2 Mar 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.