Nuno Lopes wrote: > AFAIK MySQL doesn't allow multiple querys (except with > mysqli_multi_query()), so the example was wrong. > But other DBs allow it. I don't know if it is the case of PostgreSQL (the > second example), but at least the example could be adapted to work.
> What do you think? I agree but I didn't find any meaningful example. I thought about stupid mysql_query($_GET["query"]) but it's not about the SQL injection. Maybe with subqueries something can be done but they are not in MySQL < 4.1. Multiple SQL commands will not work with mysql_query, pg_query and sqlite_query (if returned value is used) AFAIK. Jakub Vrana