Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using a combination of PHP and MySQL, let\'s say I have a database with some tab

ID: 656194 • Letter: U

Question

Using a combination of PHP and MySQL, let's say I have a database with some tables. I have a page (php or html) which allows a user to enter a string; this will search a specific table for their input and return information on the entry if it exists, and tell them nothing could be found otherwise. So more specifically, if I had a table titled "zookeepers" and I wanted a page where the user is prompted to enter a name and return whether there was a zookeeper with that name or not and if so output his information, what would the code look like for that?

Explanation / Answer

SELECT * FROM zookeepers WHERE name = $variable
SELECT * FROM zookeeper WHERE name LIKE '%$variable%'";

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote