Two queries with one mysql_query call?
#1

I tried using BlueG plugins R6 and R33.

Both plugins show an error while the same query executes just fine in pMA. What is up with that? The fact that it works in phpMyAdmin tells me that the query syntax is fine.


I tried a simple query:
Код:
SELECT * FROM players; INSERT INTO players(name)VALUES('hi')
R33 error:
pawn Код:
[ERROR] CMySQLQuery::Execute[] - (error #1064) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO players(name)VALUES('hi')' at line 1
R6 error:
pawn Код:
CMySQLHandler::Query(SELECT * FROM players INSERT INTO players(name)VALUES('hi');) - An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INSERT INTO players(name)VALUES('hi')' at line 1)
Reply
#2

Looks to be as if BlueG removes semicolons inside queries, perhaps escapes the string?
Reply
#3

This is not possible as far as I know. If you want to do something else (e.g. auditing) when a query executes, have a look at MySQL triggers.
Reply
#4

I actually don't want anything. I'm just interested on WHY doesn't it work?
Reply
#5

BlueG intentionally disabled multiple queries in one query:
http://forum.sa-mp.com/showthread.ph...le#post3121344
Reply
#6

Thanks PowerPC603! SQL injections were the reason I wanted to know this in the first place
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)