dannyluked Posted May 9, 2010 Share Posted May 9, 2010 Hi, I have 2 tables, Table 1 ID | Name 1 | Item 1 2 | Item 2 Table 2 ID | Name | nomb 1 | Product 1 | 1 3 5 I want to make something that will echo the rows in Table 2. However, if the user selects a product from 'Table 1' (like Item 1) they cant have certain item(s) from 'Table 2'. Example, If user chooses Item 1 (with id '1') they cant have a product from Table 2 because it is not compatible. Whether it is compatible is stated in the 'nomb' column. In there the ID's of none compatible items from Table 1 will be stored. At the moment the 'nomb' column states that it is not compatible with items from Table 1 that have the ID 1, 3 or 5. Basically I need to split up the column 'nomb' (remove the space) and give it its own variable. Further exaple, 1) User Chooses Item 2 from Table 1 so they can have the Product in Table 2 2) If user chooses Item 1 then they cant have another product because it is not compatible with Product 1 (the 'nomb' column contains the ID of Item 1) Thanks in advance and I'm sorry it is so hard to understand Quote Link to comment https://forums.phpfreaks.com/topic/201193-splitting-a-row/ 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.