Jump to content

Help with fetching and returning PHP results from a MYSQL Database.


Recommended Posts

I am attempting to develop a PHP search engine that fetches results from a MYSQL database, however i am struggling on getting the search engine to fetch results from the database, i'm not sure how you do that. If anyone could offer any help or code to help with this that would be great :)

 

Also i am developing another PHP search engine that when you type the name of a film it will fetch and return a random result from the database that is in the same category as the film typed in, i hope to get it to forward to another page with the result on that page. If anyone can offer any help or code with this too that would be most appreciated.

 

Thanks in advance :)

Well start out with a mysql tutorial: http://www.tizag.com/mysqlTutorial/

 

you want to do a select statement though (probably using the LIKE keyword) for the search. something like

SELECT columns FROM table WHERE column_to_check_against LIKE 'search term'

Thanks for the reply, but i am majorly concerned on how to retrieve a random result from my MYSQL database, my column names are as follows: Name ID, Category ID, Rating ID, Names, Category, Rating and Description , my idea was for you to be able to enter a name or something relating to that name and for the script to look in the database for a film that has the same category number as that film typed in and fetch an random one. The thing is i dont understand how to implement the code in a script and i don't know how to retrieve a random result and show it. I have looked for help on the internet and stuff, but none of the tutorials show me the code for implementing this. Thanks for your reply.

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.