I believe both of you pretty much understand what the problem is, the only thing is that the solution doesn't work:
<?
$a = "INSERT INTO admins SET id=2, login='test \'user'";
$b = "UPDATE admins SET login='saloon12yrd', email='sal@biochronox.com' WHERE id=1";
preg_match("/SET (.)(WHERE)?/i",$a,$ma);
preg_match("/SET (.)(WHERE)?/i",$b,$mb);
echo ("$ma[1]<br>");
echo ("$mb[1]<br>");
?>
Output:
id=2, login='test \'user'
login='saloon12yrd', email='sal@biochronox.com' WHERE id=1
I don't want the "WHERE id=1" thing in the second result. If I change the lines 4 and 5 of the code above to:
preg_match("/SET (.)/i",$a,$ma);
preg_match("/SET (.)/i",$b,$mb);
I get the exact same result.
Any further ideas? Thx so far,
Dominique
BTW: I'm using PHP 4.0.6