sanderphp Posted May 2, 2008 Share Posted May 2, 2008 I am creating my first db with 2 tables. I am tracking how many miles my friends and I are riding. My first table is "riders" and has these fields: 'ID' int autoincrement primary 'rider' Text Second table is "info" and has these fields" 'ID' int autoincrement primary 'date' date 'total_distance' int 'total_time' int 'rider_id' int Can anyone point me in the right direction on how I would my data to 2 tables, I've only done simple single table db's before. Quote Link to comment https://forums.phpfreaks.com/topic/103810-solved-first-time-using-2-tables/ Share on other sites More sharing options...
iarp Posted May 2, 2008 Share Posted May 2, 2008 Can anyone point me in the right direction on how I would my data to 2 tables How you would what? combine on a webpage? Quote Link to comment https://forums.phpfreaks.com/topic/103810-solved-first-time-using-2-tables/#findComment-531446 Share on other sites More sharing options...
firecat318 Posted May 2, 2008 Share Posted May 2, 2008 On how you would create them or how you would insert your data into them? If you have phpmyadmin, you can easily go into the db to create the tables. But if you don't, then use this guide. http://www.tizag.com/mysqlTutorial/mysqltables.php Post back on what you were needing help on. Quote Link to comment https://forums.phpfreaks.com/topic/103810-solved-first-time-using-2-tables/#findComment-531448 Share on other sites More sharing options...
sanderphp Posted May 2, 2008 Author Share Posted May 2, 2008 Sorry I should have read my post before hitting Post. I need help understanding how I store the data. I would manually add records to the first table to enable users right? Then the riders would log their miles based on them choosing their own name from a picklist or based on their log in to the page. Does that sound like the way I need to do this? Quote Link to comment https://forums.phpfreaks.com/topic/103810-solved-first-time-using-2-tables/#findComment-531451 Share on other sites More sharing options...
sanderphp Posted May 2, 2008 Author Share Posted May 2, 2008 I have the tables created already. Rider_id will refer to the id of the rider table is this correct? Quote Link to comment https://forums.phpfreaks.com/topic/103810-solved-first-time-using-2-tables/#findComment-531452 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.