INSERT INTO mysql error
#6

Cmon ppl, how is the problem in GetName ?!!! Dem random posts ..

PHP код:
[14:15:44ProcessQueryThread(DefaultCallback) - Query was successful. (INSERT INTO `Accounts` (`Username`,`pPass`) VALUES ('testing_test','‹'))
[
14:15:46Passing query [U]INSERT[/UINTO `Accounts` (`Gender`) VALUES(``) WHERE `Username` = 'testing_test' 
[
14:15:46CMySQLHandler::ProcessQueryThread() - Error will be triggered to OnQueryError()
[
14:15:46OnQueryError() - Called
First line tells us inserting was successful, therefore your insert query only needs 2 values to be a successful insert, therefore other columns all have defaults or just doesn't exist.
Here's the part, after you make a player's mysql row, you shouldn't use insert, but you should use UPDATE to update his gender and country (if those columns exist in your database, if not create them first and give them a default value).
PHP код:
`pRankName` = %
Here's another problem, whenever you are passing a string to MYSQL, you should use ' ' (and also better to use %e with mysql_format to escape the strings)
Correct code would be
PHP код:
`pRankName` = '%s' 
PHP код:
`XPos` = %d, `ZPos` = %d, `YPos` = %
%d is for integers, %f is for floats

PHP код:
WHERE `Username` = '' 
Oh and this suggests you missed some of variables, making username missing.
PHP код:
PlayerInfo[playerid][RentingVehicle] = 
^^And I'm not sure if this is gonna work


These are so far only problems I could see, fix these and update the thread with your updated code and we'll see if any more is wrong with it.
Reply


Messages In This Thread
INSERT INTO mysql error - by OMonger - 10.01.2016, 13:27
Re: INSERT INTO mysql error - by OMonger - 10.01.2016, 15:25
Re: INSERT INTO mysql error - by OwlIT - 10.01.2016, 15:39
Re: INSERT INTO mysql error - by OMonger - 10.01.2016, 16:18
Re: INSERT INTO mysql error - by OMonger - 10.01.2016, 17:53
Re: INSERT INTO mysql error - by PrO.GameR - 10.01.2016, 18:40

Forum Jump:


Users browsing this thread: 1 Guest(s)