I have a query like this:
update T_table set detail = 'XXXX' where num = 155;
which on my php file looks like this:
$sql = "update T_table set ".$_GET['field']." = '".$_GET['value']."' where num = ".$_GET['num'];
$output = mysql_query($sql);
I would like to know if it is possible to inject SQL where the XXXX
are in the query. Because they will be replaced by a sting from $_GET
, and if it is possible how would you do?
Important: My MYSQL database is not allowing double pipes (||
) as a concatenation operator.