Hi,
Is it possible to get the output of a mySQL query to the screen with PHP?
I want to build a page with an textarea where the admin can give a valid sql-query (e.g. CREATE TABEL test (test_id INT NOT NULL, test_txt TEXT); or "SHOW TABLES;") and submit it to the executing php-script.
I want the output of mysql back on the screen. (If there is any).
I know, you get output when you execute a query at the mySQL-commandline (mysql>). I wonder if this output (e.g. "Query OK, 0 rows affected (0.00 sec)") is available in the PHP-script after executing $result = mysql_query (theQuery). If I print $result I only get a 0 or 1 for (failed or succeeded).
I guess that anyone has done this before, so please help!
Thanks,
Arjaan