I have a test on a DB query that looks like this:
switch(preg_match("/INSERT|UPDATE|DELETE|COUNT/", $query))
{
case 1:
do something;
break;
case 0:
do something else;
break;
}
I have ran queries that contain “INSERT” but the results from the preg_match() always turn up 0.
Am I missing something?
Thanks!