jhollin1138 Posted May 23, 2005 Posted May 23, 2005 First off, I am a MySql newbie and I just started teaching myself PHP. I am trying to figure out how to query a MySql database and I have no idea how to structure it. I have read a few things online, but the sites I found still left me confused. Does anyone good resources (either online or book) on doing MySql? The more examples of queries the better. Quote
jhollin1138 Posted May 23, 2005 Author Posted May 23, 2005 One nice site for tutorials is Tizag.com <{POST_SNAPBACK}> Thanks Don, that looks very helpful. Of course if anyone knows of more sites, it wouldn't hurt. Quote
bboyjay Posted May 23, 2005 Posted May 23, 2005 (edited) php.net is where I learned to merge php and MySQL. but then if you're tying to learn MySQL, a good site would be W3 Schools. I used that page for a lot of web related stuff (CSS and stuff). php.net -> more specific there is a good example and a list of all the php functions useful to use mysql. Edited May 23, 2005 by bboyjay Quote
jhollin1138 Posted May 23, 2005 Author Posted May 23, 2005 php.net is where I learned to merge php and MySQL. but then if you're tying to learn MySQL, a good site would be W3 Schools. I used that page for a lot of web related stuff (CSS and stuff). php.net -> more specific there is a good example and a list of all the php functions useful to use mysql. <{POST_SNAPBACK}> Thanks for the help. I don't have a problem with the PHP side, it is more the MySQL query structure I am confused with. PHP.net is a good source, if you know what you are looking for. Unfortunately, their examples of queries are limited and pretty basic. As for W3 Schools, they don't have anything on MySQL queries that I could find. It is an excellent site, I have used it before to learn CSS and as a basic HTML resource. Quote
owatagal Posted May 23, 2005 Posted May 23, 2005 I've used the tutorials at Codewalkers -- ht*tp://codewalkers.com and PHP Builder -- ht*tp://phpbuilder.com They're a little pick-and-mix as to what they actually have tutorials on, but the ones they do have I used quite a bit when I was learning. Quote
stevevan Posted May 23, 2005 Posted May 23, 2005 I don't recall seeing it, but is there a "MySQL for Dummies" out there? I love their books! They explain things in simple, down-to-earth terms that are easy to comprehend and remember. Quote
TCH-Bruce Posted May 23, 2005 Posted May 23, 2005 Yes, there is a Dummies book for PHP/MySQL and I have a copy. Quote
jhollin1138 Posted May 24, 2005 Author Posted May 24, 2005 From the reviews I read online, the PHP/MySQL for Dummies book doesn't seem that good. I had one when I was learning Unix and wasn't to impressed. I learned more from the HP-UX reference manuals that came with the server then I did with the "Dummy" book. Based on some of the reviews I read, I ordered a copy of "PHP and MySQL Web Development, Second Edition" by Luke Welling & Laura Thomson. I probably am still going to need something that strictly focuses on MySQL, but I am going to wait and see if I can figure it using the sites people have mentioned and the book I ordered. Thanks for all the good suggestions! Quote
TCH-Don Posted May 24, 2005 Posted May 24, 2005 Thats a very good book I got it for the PHP part, but the database section is good too. We will be quizzing you later Quote
jhollin1138 Posted May 24, 2005 Author Posted May 24, 2005 We will be quizzing you later <{POST_SNAPBACK}> I'll probably fail that test too. Quote
jhollin1138 Posted May 27, 2005 Author Posted May 27, 2005 Well, with the site that Don gave me, it got me going. The book I ordered was no help, only since I haven't received it yet. Here is the query I needed (the names have been changed to protect the innocent). >$sql = "SELECT s.table_row, COUNT(s2.shout_id) AS table_row_number FROM ".SQLTABLE." s, ".SQLTABLE." s2 WHERE s2.table_row >= ".$somenumber." AND s.table_row = ".$somenumber." GROUP BY s.table_row ORDER BY s2.table_row DESC"; Thanks again for all the help. This was fun, I can't wait until I get the book I ordered and I can learn to unlock the potential for using PHP & MySQL. Quote
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.