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 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 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. 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'); 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. Link to comment https://forums.phpfreaks.com/topic/52157-mysql-table-stucture/#findComment-257296 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.