alexsaidani Posted January 26, 2010 Share Posted January 26, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/189880-help-with-fetching-and-returning-php-results-from-a-mysql-database/ Share on other sites More sharing options...
mikesta707 Posted January 26, 2010 Share Posted January 26, 2010 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' Quote Link to comment https://forums.phpfreaks.com/topic/189880-help-with-fetching-and-returning-php-results-from-a-mysql-database/#findComment-1001959 Share on other sites More sharing options...
alexsaidani Posted January 26, 2010 Author Share Posted January 26, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/189880-help-with-fetching-and-returning-php-results-from-a-mysql-database/#findComment-1002096 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.