|
Posted by Janwillem Borleffs on 09/28/33 11:58
artev wrote:
> notice, I not want to do this:
> AND text ='".mysql_real_escape_string($text)."'";
>
Some options:
1:-
$text = mysql_real_escape_string($text);
$query = "SELECT ID, text
FROM table
WHERE ID>100
AND text = '$text'";
2:-
$query = sprintf("select .... and text = '%s'",
mysql_real_escape_string($text));
3:-
Using the prepare method of the mysqli interface (PHP 5 only);
http://www.php.net/manual/en/function.mysqli-prepare.php
JW
Navigation:
[Reply to this message]
|