Forum Moderators: open
In the processing page i write
$sql="INSERT INTO storage (tags,trusted)VALUES('$tags','0')";
The table storage has tags as text and trusted as tinyint(1);
The above query send trusted values as a string(i think) but in db it's of tinyint(1)
So is there any need to send values as
VALUES('$tags',0) INSTEAD OF
VALUES('$tags','0') Or it will be type converted automatically?
'0'
and
0
are identical within a query.
However,
It is BEST PRACTICE to ALWAYS delimit field values between ', and further still, make sure that the values are safe to insert into a query, for example by using mysql_escape_string()...