MySQL PHP database within site
I have tried to post this in the most relevant place, please forgive if I haven't followed any posting regulations as I'm new to the site.
I am currently attempting to create a search feature similar to the one found here http://www.s-h-a.co.uk/searchresults.php to return results according to a certain criteria.
Im assuming you store all the data in a SQL database and somehow link it in the site so that it queries the database when you click search, however I am not finding any solid information or tutorials on how to do this. I understand that researching MySQL and learning it is a mission on its own. But aside from that is MySQL the way to do it? Or are there any other solutions.
I will probably be using WordPress for the sites platform if that makes anything easier or harder.
Thanks, any information is greatly appreciated.
The hosting company you are using will have information on how to setup the MySql database. Generally depending upon your hosting system, one would use their administration system such as C-Panel, select MySQL Database, and create your new database. It will then tell you how to log in using the root path, username, and password you created the DB with. Once created you can use phpMyAdmin to create tables. Your PHP code will then access the DB from the website you created.
MySQL is certainly a viable option for the database side of things, but by no means the only one -- PostgreSQL is a similar sort of open-source RDBMS that is essentially comparable and which some might prefer. But those are only two of the more commonly used options. While the choice of DBMS will affect some of the implementation specifics (not a lot if you can abstract it out, such as with the PDO extension in PHP), it's probably not your biggest concern for now.
Probably of more importance right now is determining your database design -- how the data will be organized to maximize reading and writing from the database -- and that will take more than a forum post or two to deal with it. The actual DBMS you'll use may be more dependent on where you plan to host the site and the server-side environment you'll be working with -- or if you favor a particular environment and DBMS, then that will drive your choice on hosting.
Some helpful information, I have actually created a database within MySQL under my C-Panel, I should probably of said that before. I just need to get to grips with creating tables and what the different settings and fields mean.
So it is simple enough to make a form search my database (which will be of around 100 different hotels) and return the relevant ones to a results page?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)