d.shankar Posted November 23, 2007 Share Posted November 23, 2007 I have a table "test" with 2 columns "cars" and "bikes" both are null columns.. first i insert for cars as "car1" and leave blank(null) for bikes similarly i add "car2" and again leave blank for bikes Now i add "bike1" and it displays like this as it should cars bikes car1 car2 bike1 but i need to have like this cars bikes car1 bike1 car2 Am i clear ?? Quote Link to comment https://forums.phpfreaks.com/topic/78524-tricky-data-insertion/ Share on other sites More sharing options...
fenway Posted November 23, 2007 Share Posted November 23, 2007 No, you're not clear. Quote Link to comment https://forums.phpfreaks.com/topic/78524-tricky-data-insertion/#findComment-397510 Share on other sites More sharing options...
d.shankar Posted November 23, 2007 Author Share Posted November 23, 2007 ok here is the table setup insert into test values("car1","") ; // row 1 created insert into test values("car2","") ; // row 2 created insert into test values("","bike1") ; // row 3 created Now the table looks like car1 car2 bike1 But i need to have like this car1 bike1 car2 Any idea ? Quote Link to comment https://forums.phpfreaks.com/topic/78524-tricky-data-insertion/#findComment-397563 Share on other sites More sharing options...
fenway Posted November 23, 2007 Share Posted November 23, 2007 The table doesn't "look" like anything. Query it however you desire for your output. And I have no idea what kind of relation there is between these fields. Quote Link to comment https://forums.phpfreaks.com/topic/78524-tricky-data-insertion/#findComment-397587 Share on other sites More sharing options...
revraz Posted November 23, 2007 Share Posted November 23, 2007 So you have two columns in one table. You want to place your Car entry in the first available NULL car column and also place a Bike entry in the first available NULL bike column? Quote Link to comment https://forums.phpfreaks.com/topic/78524-tricky-data-insertion/#findComment-397602 Share on other sites More sharing options...
d.shankar Posted November 23, 2007 Author Share Posted November 23, 2007 yea you got it right bud Quote Link to comment https://forums.phpfreaks.com/topic/78524-tricky-data-insertion/#findComment-397651 Share on other sites More sharing options...
fenway Posted November 23, 2007 Share Posted November 23, 2007 yea you got it right bud Whatever table you're designing, it's wrong. Quote Link to comment https://forums.phpfreaks.com/topic/78524-tricky-data-insertion/#findComment-397656 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.