Page 1 of 1

simple database help .....

Posted: Tue Jun 10, 2008 4:43 pm
by housewivesfavourite
CAN SOMEBODY PLEASE HELP ME .....
I'm trying to make a simple a database using mysql/php/apache under windows. Through hours of searching the net I still can't find what I'm after. I'd like to list my dvd collection using a database and a simple search engine. I would like to be able to search the "title","actor" & "year" of the dvd's. I understand the concept of the database but cannot find the right code for all 3 applications on the net. I need the mysql code for this, the php code to retrieve and display the results I search for & the html code for the initial search engine page. Any help would be deeply appreciated. If anyone can help or if you need more information my idea then please let me know. You can call the database,tables & fields any name you like.

Thank you all in advance

Re: simple database help .....

Posted: Tue Jun 10, 2008 4:53 pm
by superdezign
A search engine and a database application are a bit different. Just a database application would be given the exact names / IDs and use that to order / filter the data. A search engine would be given keywords and find matches or similar entries. Which are you after?

Re: simple database help .....

Posted: Wed Jun 11, 2008 9:31 am
by housewivesfavourite
thanks for your reply. By the sounds of it I'm after the "search engine" option. If the "search engine" allows me to search for example: title then displays the results that what I need but could I get a search engine to search any field.

Thanks again.

Re: simple database help .....

Posted: Wed Jun 11, 2008 9:59 am
by superdezign
Then you should be interested in wildcards and FULLTEXT fields in MySQL. FULLTEXT fields are searchable by the database, and wildcards (%) allow you to search for data that contains the text you've given without needing to specify all of the text. For example:

Code: Select all

SELECT * FROM `tableName` WHERE `data` LIKE 'Test%'
That will match 'Test Data' and 'Test', but won't match 'A Test'. You can use multiple wildcards and surround keywords to make good use of the feature.

Re: simple database help .....

Posted: Wed Jun 11, 2008 10:11 am
by housewivesfavourite
that's great cheers but I don't think I know enough about mysql and databases to implement the code myself but I'll defo try & learn how to use this code.

Thanks again appeciate your help

Re: simple database help .....

Posted: Wed Jun 11, 2008 1:12 pm
by califdon
housewivesfavourite wrote:that's great cheers but I don't think I know enough about mysql and databases to implement the code myself but I'll defo try & learn how to use this code.

Thanks again appeciate your help
What I think you need to do is go through tutorials on each of the technologies you mentioned (and I would recommend doing it in this order):
HTML (incl. CSS)
PHP
MySQL (incl. basic SQL syntax)

A forum like this can be very helpful when you have 95% of your project working and you are stuck on one or two points, or when you have some basic structural questions about which way to develop something, but a forum can never teach you a whole language or technology. You have to learn the basics on your own, then come here and ask specific questions.

I recommend starting with the mother of all tutorial collections: w3schools.com.

You can find many other tutorials by using a search engine with terms like tutorial php, etc.

Re: simple database help .....

Posted: Wed Jun 11, 2008 2:20 pm
by housewivesfavourite
thanks so much for the advice it's been most informative. I understand what you're saying about forums and i'll try and use the service better in future.

Thanks again

Re: simple database help .....

Posted: Wed Jun 11, 2008 4:19 pm
by housewivesfavourite
CAN'T THANK YOU ENOUGH
I've had a good look around the site you recommended and it's FANTASTIC..... cheers you certainly know your stuff

Once again thank you