DJTim666 Posted May 19, 2007 Share Posted May 19, 2007 mysql_query("INSERT INTO `users` ( `id` , `username` , `password` , `email` , `rp` , `gender` , `birthday` , `date_registered` ) VALUES ( NULL , '$user', '$pass', '$email', '2500', '$gender', '$birthday', '$date' );"); Can anyone help me make a table structure for that information please Quote Link to comment https://forums.phpfreaks.com/topic/52157-mysql-table-stucture/ Share on other sites More sharing options...
DJTim666 Posted May 19, 2007 Author Share Posted May 19, 2007 bump Quote Link to comment https://forums.phpfreaks.com/topic/52157-mysql-table-stucture/#findComment-257261 Share on other sites More sharing options...
tippy_102 Posted May 20, 2007 Share Posted May 20, 2007 <?php mysql_query("CREATE TABLE users( id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY(id), username VARCHAR(30), password VARCHAR(30), email VARCHAR(30), rp VARCHAR(30), gender VARCHAR(7), birthday DATETIME, )") or die(mysql_error()); echo "Table Created!"; ?> The lengths (the numbers in the brackets) will have to be changed to suit your needs and I don't know what type of data you are using for gender or date, but this will give you an idea of how to do it. Quote Link to comment https://forums.phpfreaks.com/topic/52157-mysql-table-stucture/#findComment-257275 Share on other sites More sharing options...
DJTim666 Posted May 20, 2007 Author Share Posted May 20, 2007 Thanks, I am using this format for the date; $date = date('l, F d, Y'); Quote Link to comment https://forums.phpfreaks.com/topic/52157-mysql-table-stucture/#findComment-257283 Share on other sites More sharing options...
TRI0N Posted May 20, 2007 Share Posted May 20, 2007 Is date in the database set for a Date Format? If so the date format for MySQL is Y-m-d (2007-05-19). Inserting anything that is not in that format will be messed up. Now if your Date row is varchar then you shouldn't have a problem using the format you have now. But if it is set for DATE you will have problems. Quote Link to comment https://forums.phpfreaks.com/topic/52157-mysql-table-stucture/#findComment-257296 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.