I have been working on this project and recently got stuck. Basically lets say I have a MySQL database and it has 2 columns, Name and Carrot. I want to scan a database and check each data entry whether that person likes carrots. If they like carrots the carrots entry should be 1 and if they don’t it should be 0. If they do like carrots and want it to echo there name. How could I do this? I’m not very good with database things but this is sort of essential.
Share
I will be a tad vague myself, as I don’t know what all you have tried.
First, create a query to get a list of all people who like carrots:
Next, execute that and get the results in PHP (web search this or ask, if you don’t know how).
Then use a loop to go through each row of returned names and echo them out.
I can’t be more specific without more specific questions from you.