I struggled using sql.php to perform interactive queries. I'd write something like "select * from users" and hit enter but it would never do anything, just prompting for more input. Looking at the code taught me that it sits in a loop until the database's delimiter is detected which in my case was a semicolon. So "select * from users;" will do the trick.