Re: Struggling with MySQL query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you all for the various suggestions.

It now works with this:

$find = strip_tags($find);
$find = trim($find);

$data = mysql_query("SELECT * FROM news_items WHERE headline LIKE
'%$find%'");

Another "newb" question: does strip_tags() help at all in preventing SQL
injection attacks?

Kind regards
David

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux