Guest Posted July 31, 2008 Share Posted July 31, 2008 $dbname = $_POST['dbname']; $installQuery = " SET SQL_MODE=\"NO_AUTO_VALUE_ON_ZERO\"; CREATE DATABASE `$dbname` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; USE `$dbname`; "; Do I have to manually create the database with a php function or should this work? Link to comment https://forums.phpfreaks.com/topic/117605-mysql-query-not-working/ Share on other sites More sharing options...
akitchin Posted July 31, 2008 Share Posted July 31, 2008 well the first and foremost issue is that you can only run one query at a time using mysql_query(). separating them by semicolons won't work, and will trigger an SQL syntax error. whether those statements are allowed or not is beyond me - i would imagine it depends on the host setup and whether or not the user you're trying to run it with has permission. Link to comment https://forums.phpfreaks.com/topic/117605-mysql-query-not-working/#findComment-604942 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.