mato Posted May 13, 2013 Share Posted May 13, 2013 I have a list of raw data in several CSV files, just long lists of different codes. I'm trying to create a webpage which is just a search function, whereby a user types in a number and, depending on which table the code is in, it will redirect them to a webpage accordingly. Can I do this with MySQL/PHP? For example, user types in "056747392" into the search box on the webpage. Multiple tables are searched for this exact number. If the number is found in "table 3", the user would be directed to table3.html, or the page would display the content allied to table 3. Is this difficult? (sorry if this makes no sense) Link to comment https://forums.phpfreaks.com/topic/277970-basic-mysql-question/ Share on other sites More sharing options...
Jessica Posted May 13, 2013 Share Posted May 13, 2013 Yes, it's possible. Is it difficult? Honestly, if you have to ask if it's possible, yes, you will probably find it difficult. Why do you have multiple tables with the same type of data? Why do you have multiple pages for the same type of data? Link to comment https://forums.phpfreaks.com/topic/277970-basic-mysql-question/#findComment-1429908 Share on other sites More sharing options...
mato Posted May 13, 2013 Author Share Posted May 13, 2013 So at the moment it's like I have for example two CSV files, one for FOOD, one for DRINK. Each file contains one column with a list of product codes. I can easily merge the tables together to create one table and create a second column, specifying if that product code is FOOD or DRINK. So if the user searches the product code, it would search the one table, and if there's a match, it would perform "x" action, dependent on what the product is FOOD or DRINK. Link to comment https://forums.phpfreaks.com/topic/277970-basic-mysql-question/#findComment-1429910 Share on other sites More sharing options...
Jessica Posted May 14, 2013 Share Posted May 14, 2013 Google "data normalization" Link to comment https://forums.phpfreaks.com/topic/277970-basic-mysql-question/#findComment-1429939 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.