
For example:
$sql = "SELECT
id, field1, field2 ....
FROM table
WHERE status = 1";
And after trying some ways we found, that using preg_replace() function is the best one.
Here the pimpliest way how to do this:
$sql = preg_replace('/\s\s+/', ' ', $sql);
2 comments:
Thats cool. How can I integrate there myphp form?
$sql = preg_replace('/\s+/', ' ', $sql); do the job. ;-))
Thanks for the table ... I will test it now.
What is about the license?
Post a Comment