AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [PAWNO] The best way of using MYSQL? (https://forums.alliedmods.net/showthread.php?t=255810)

nedisor 01-20-2015 17:55

[PAWNO] The best way of using MYSQL?
 
Hello guys!

I heard that mysql_tquery is better than mysql_query. I am trying to create a car system, but i am not sure how to use corectly mysql.

I am using now this format:

Code:

        mysql_query(1, "SELECT * FROM `carsconfig` WHERE `set` = 1",true);
        cache_get_data(rows, fields, 1);
        if(rows)
        {
                cache_get_row(0, 3, csavingstring, 1); PCID = strval(csavingstring);
        }
        form

Can anyone show me how it should look when i am using mysql_tquery?

Can you explain me what is SQL injection and how can I prevent it?

P.S I have BlueG's plugin, version r39-2.


All times are GMT -4. The time now is 02:33.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.