SA-MP Forums Archive
Help :D - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help :D (/showthread.php?tid=333486)



Help :D - ColdRain - 11.04.2012

i need to do this if(inputtext == filetmp){ in mysql

now i need to make inputtext something in mysql what should i do give example so you can help me guys


Re: Help :D - ReneG - 11.04.2012

Use a string comparer. "==" is for comparing values.

Код:
if(!strcmp(inputtext,filetmp,true))



Re: Help :D - Skribblez - 11.04.2012

pawn Код:
format(string, 128, "SELECT * FROM tablename WHERE fieldname='%s'", inputtext);
mysql_query(string);
mysql_store_result();
if(mysql_num_rows())
{
// your code
}
mysql_free_result();
If you're trying to find out if the inputtext exists from a table of a certain field name with MySQL, that's how you do it.


Re: Help :D - ColdRain - 11.04.2012

Thanks


Re: Help :D - Skribblez - 11.04.2012

If that's for me, then glad to be of help. Don't forget to add a reputation point, thanks!