How can i search in db after a player?
#1

i tried this :

Код:
                if(sBizz[IDSB][sBOwnable] == 1)
                {
                        format( szQuery, 500, "SELECT * FROM `Accounts` WHERE `Name` = '%e' LIMIT 1;", sBizz[IDSB][sBDetinator] );
                        new Cache: result2 = mysql_query( SQL, szQuery );
                        new Get[ 2 ];
                        cache_get_data( Get[ 0 ], Get[ 1 ], SQL );
                        if( !Get[ 0 ] )
                        {
                                sBizz[IDSB][sBOwnable] = 0;
                                format( sBizz[IDSB][sBDetinator], 50, "No-One");
                        }
                }
But i get errors no active catche or invalid data type row or something like these...

The full script : http://pastebin.com/92AAb9m4



I want:

- To check in 'Accounts' if a player name [sBDetinator] exist , if no , to reset the sbusiness.
Reply
#2

Function mysql_query can't use specifier %e. Try to change it to %s.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)