Jump to content

Basic MySQL question


mato

Recommended Posts

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)

Edited by mato
Link to comment
Share on other sites

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
Share on other sites

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.

Edited by mato
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.