[PHP] Re: create if table not exists

2004-05-17 Thread John Taylor-Johnston
Should have read: CREATE TABLE IF NOT EXISTS `mhinse_counter` > mysql_error said: > > "IF NOT EXISTS `mhinse_counter` CREATE TABLE `mhinse_counter` ( " > Thanks to all. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: create if table not exists

2004-05-16 Thread John Taylor-Johnston
I used phpmyadmin to help generate some code. When I add: IF NOT EXISTS `mhinse_counter` it mysql_errors that the error is around: "IF NOT EXISTS `mhinse_counter` CREATE TABLE `mhinse_counter` ( " Can anyone see clear here? $server = "localhost"; $user = "user1"; $pass = "**"; $db="jt

[PHP] Re: create if table not exists

2004-05-16 Thread Tim Van Wassenhove
In article <[EMAIL PROTECTED]>, John Taylor-Johnston wrote: > How can I check if a table exists in a mysql db. $query = 'IF NOT EXISTS table CREATE TABLE table (..)'; mysql_query($query); -- Tim Van Wassenhove -- PHP General Mailing List (http://w