vonnero Posted February 17, 2009 Share Posted February 17, 2009 I am not sure where the problem is..... but still cant get it to work... Please assist. Thanks $dbh=mysql_connect("localhost","user","password"); if($dbh) { echo "Connected to MySql Server<Br>"; } else { echo mysql_error(); } $select=mysql_select_db("students"); if($select) { echo "database selected<br>"; } $query=mysql_query("CREATE TABLE friendslist (id INT AUTO_INCREMENT PRIMARY KEY, requestorid INT not null,requestedid INT not null,requestedate TIMESTAMP not null, response varchar(10) null"); if($query) { echo "Tables created"; } Quote Link to comment https://forums.phpfreaks.com/topic/145552-urgent-help/ Share on other sites More sharing options...
Mchl Posted February 17, 2009 Share Posted February 17, 2009 I am not sure where the problem is..... Neither do I, because you did not write what's going on. Do you get any error messages? Quote Link to comment https://forums.phpfreaks.com/topic/145552-urgent-help/#findComment-764149 Share on other sites More sharing options...
.josh Posted February 17, 2009 Share Posted February 17, 2009 I keep trying to figure out what's going wrong, but that whole "urgent" thing puts too much pressure on me. I'm too nervous to think straight. Quote Link to comment https://forums.phpfreaks.com/topic/145552-urgent-help/#findComment-764156 Share on other sites More sharing options...
gevans Posted February 17, 2009 Share Posted February 17, 2009 I keep trying to figure out what's going wrong, but that whole "urgent" thing puts too much pressure on me. I'm too nervous to think straight. I don't like seeing you nervous, it makes my working day unstable Quote Link to comment https://forums.phpfreaks.com/topic/145552-urgent-help/#findComment-764158 Share on other sites More sharing options...
premiso Posted February 17, 2009 Share Posted February 17, 2009 Well almost 5 hours later, hope that is urgent enough *rollseyes* CREATE TABLE friendslist (id INT AUTO_INCREMENT, requestorid INT not null,requestedid INT not null,requestedate TIMESTAMP not null, response varchar(10) null, PRIMARY KEY (`id`)) Should fix the problem. If you had this: $query=mysql_query("CREATE TABLE friendslist (id INT AUTO_INCREMENT PRIMARY KEY, requestorid INT not null,requestedid INT not null,requestedate TIMESTAMP not null, response varchar(10) null") or die(mysql_error()); You may have been able to solve it on your own. Alternatively thoroughly learning SQL Create Table would have helped you tremendously. I would suggest reading up on that or even buying a "SQL For Dummies" book to learn at least the basics of SQL. Quote Link to comment https://forums.phpfreaks.com/topic/145552-urgent-help/#findComment-764260 Share on other sites More sharing options...
vonnero Posted February 17, 2009 Author Share Posted February 17, 2009 thanks for all the responses... it gives me a blank page but I copied the SQL part of it to mysql command line monitor and it worked from there.......... CREATE TABLE friendslist (id INT AUTO_INCREMENT PRIMARY KEY, requestorid INT not null,requestedid INT not null,requestedate TIMESTAMP not null, response varchar(10) null);......... I am not sure why BUT thanks everyone...!! Quote Link to comment https://forums.phpfreaks.com/topic/145552-urgent-help/#findComment-764385 Share on other sites More sharing options...
cooldude832 Posted February 17, 2009 Share Posted February 17, 2009 obviously this wasn't "urgent" and the person lied so they shouldn't be helped I also don't see why u are building tables in php instead of using phpmyadmin (unless u doing something stupid like dynamic table generation). Quote Link to comment https://forums.phpfreaks.com/topic/145552-urgent-help/#findComment-764389 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.