Hi,
PHP - I'm trying to create a MySQL table like an existing MySql table.
My PHP code is
$query = "CREATE TABLE '".$new_db."'.' ".$new_name ."' LIKE '".
$old_db."'.'".$ old_name."'";
echo mysql_error()." <br>";
When I run in the browser I get -
You have an error in your SQL syntax near
''forest_client _XXX000001'.'ac counts' LIKE
'forest_client_ fds000003'.'acc ounts'' at line 1
The $new_db, $old_db and $old_name all do exist
I have tried removing the quote marks and have tried to do it in
MyPHPAdmin all to no avail
Any ideas gratefully received
PHP - I'm trying to create a MySQL table like an existing MySql table.
My PHP code is
$query = "CREATE TABLE '".$new_db."'.' ".$new_name ."' LIKE '".
$old_db."'.'".$ old_name."'";
echo mysql_error()." <br>";
When I run in the browser I get -
You have an error in your SQL syntax near
''forest_client _XXX000001'.'ac counts' LIKE
'forest_client_ fds000003'.'acc ounts'' at line 1
The $new_db, $old_db and $old_name all do exist
I have tried removing the quote marks and have tried to do it in
MyPHPAdmin all to no avail
Any ideas gratefully received
Comment