Another SQL Problem... -
aRoach - 03.04.2012
Well guys, I need some help about this:
pawn Код:
new Query[ 129 ];
format( Query, 129, "INSERT INTO `Banlist` VALUES('%s','%s','%s','%s','%s')", GetPlayerIpEx( u_P ), pName( u_P ), s_R, pName( playerid ), Date( ) );
db_query( g_dbKeptAlive, Query );
It doesn't put the information in the DB...
-----------
I've tried this too:
pawn Код:
new Query[ 129 ];
format( Query, 129, "INSERT INTO Banlist(`IP`, `Name`, `Reason`, `Admin`, `BanDate`) VALUES('%s', '%s', '%s', '%s', '%s')", GetPlayerIpEx( u_P ), pName( u_P ), s_R, pName( playerid ), Date( ) );
db_query( g_dbKeptAlive, Query );
-----------
So, please.. Help me!
Re: Another SQL Problem... -
blank. - 03.04.2012
In the debug output, does the query cut out?
Re: Another SQL Problem... -
aRoach - 03.04.2012
The same thing, when I try to do It in the SQL Manager with some random Values it Works...
Re: Another SQL Problem... -
[MG]Dimi - 03.04.2012
pawn Код:
new Query[ 129 ];
format( Query, 129, "INSERT INTO `Banlist` (`IP`, `Name`, `Reason`, `Admin`, `BanDate`) VALUES ('%s', '%s', '%s', '%s', '%s')", GetPlayerIpEx( u_P ), pName( u_P ), s_R, pName( playerid ), Date( ) );
db_query( g_dbKeptAlive, Query );
Column and Table name inside `` and values inside ' '. When using INSERT INTO you must define Columns in which to store values before giving values.
Re: Another SQL Problem... -
aRoach - 03.04.2012
The same thing, I've used this first but... no result..
Re: Another SQL Problem... -
Edvin - 03.04.2012
probably is the dialogid ... other function works on it?
Re: Another SQL Problem... -
aRoach - 03.04.2012
The dialog works fine lol...
And yes, the other functions works fine...
Re: Another SQL Problem... -
blank. - 03.04.2012
Quote:
Originally Posted by [MG]Dimi
pawn Код:
new Query[ 129 ]; format( Query, 129, "INSERT INTO `Banlist` (`IP`, `Name`, `Reason`, `Admin`, `BanDate`) VALUES ('%s', '%s', '%s', '%s', '%s')", GetPlayerIpEx( u_P ), pName( u_P ), s_R, pName( playerid ), Date( ) ); db_query( g_dbKeptAlive, Query );
Column and Table name inside `` and values inside ' '. When using INSERT INTO you must define Columns in which to store values before giving values.
|
That doesn't make any difference,
OP, does the query cut out on debug output?
Re: Another SQL Problem... -
Edvin - 03.04.2012
Oh, i got it xD
Try to increase the
new Query ... in:
Try now ^^, shut work now
Re: Another SQL Problem... -
[MG]Dimi - 03.04.2012
Quote:
Originally Posted by blank.
That doesn't make any difference,
OP, does the query cut out on debug output?
|
Trust me that it does since 90% of time MySQL (or SQLLite) return Error in SQL Synatx.