pouncer Posted March 18, 2007 Share Posted March 18, 2007 $create_str = "CREATE TABLE $cat (item_id INT not null auto_increment primary key, image_URL text)"; $cre = mysql_query($create_str); is there something wrong with my code, because it just doesn't create the table :s Quote Link to comment Share on other sites More sharing options...
chawezul Posted March 18, 2007 Share Posted March 18, 2007 Your query is sound and it worked on my system. Perhaps you didn't select a database with mysql_select_db() ? Also you can try to see if $cat gets deleted or set to "" at any point. Quote Link to comment Share on other sites More sharing options...
pouncer Posted March 18, 2007 Author Share Posted March 18, 2007 at the top of the page i have require_once("../php_classes/class_login.php"); and that class_login has all the connect/select db stuff in there. i checked the $cat value too, it doesn't change :s i am stumped :s Quote Link to comment Share on other sites More sharing options...
chawezul Posted March 18, 2007 Share Posted March 18, 2007 Make your script print() or echo() your query string out to you, then paste it into PhpMyAdmin or similar and see if it yields any errors or hints. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.