SA-MP Forums Archive
ORM systems - 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: ORM systems (/showthread.php?tid=490847)



ORM systems - speed258 - 28.01.2014

Hi guys after orm systems was released i have one question about sql "AND" and "OR" how they should look like in orm systems?


Re: ORM systems - Mystique - 28.01.2014

Here is AndreTs' orm system tutorial, it might help.

https://sampforum.blast.hk/showthread.php?tid=461766


Re: ORM systems - speed258 - 28.01.2014

i know how to use single one parameter but when i need two or three so how about that?


Re: ORM systems - Misiur - 28.01.2014

I'm not quite sure what are you talking about. If you fire your own queries, and then use orm_apply_cache, you have full control over where statements in queries.


Re: ORM systems - speed258 - 28.01.2014

Код:
mysql_format(hangle, querys, sizeof(querys), "SELECT * FROM `data` WHERE Name = '%s' OR Protocol = '%s' LIMIT 1", PlayerName(playerid), GetPlayerIpEx(playerid));
you see what i mean?


Re: ORM systems - Misiur - 28.01.2014

That's what I was talking about. Now when you pass callback to mysql_tquery, simply use inside it orm_apply_cache.