Query Inserting Wrong Number[Fixed]

Place for questions and answers for all newcomers and new coders. This is a free for all forum, no question is too stupid and to noob.
Post Reply
User avatar
MikeD
Posts: 294
Joined: Thu Sep 08, 2011 4:28 am

Query Inserting Wrong Number[Fixed]

Post by MikeD »

So, I'm trying to create viewable results for players to see of each arena round in my game.

Problem is, is that it's inserting the wrong arena number. It inserts 127, I have no idea where It's getting that number, I am echo'ing out the variable $arenanumber and it's showing the correct value 156.

Here's the query. (This is part of a multi_query)

Code: Select all

$update .= "INSERT INTO `lwresults`(`gameround`,`arenanumber`,`round`,`pid`,`attacker`,`defpid`,`defender`,`damage`,`kill`,`heal`,`style`)VALUES('$arenainfo[gameround]','$arenanumber','$arenainfo[round]','$row[5]','$row[1]','$targetpid','$targetname','$damage','$kills','0','$style')";
The problem is with `arenanumber` and '$arenanumber'

How it's getting 127, is mindboggling
Last edited by MikeD on Sat Feb 18, 2012 2:31 am, edited 1 time in total.
User avatar
MikeD
Posts: 294
Joined: Thu Sep 08, 2011 4:28 am

Re: Query Inserting Wrong Number

Post by MikeD »

Lol nevermind, found the problem, was a tinyint(2) in the DB, needed to be smallint(3)
Post Reply

Return to “Beginner Help and Support”