Google Community
Latest Forums Rules Resources
Custom Search

Go Back   Google Community > Webmaster Forums > Web Design, Coding & Programming Forum

GoogleCommunity Sponsor
Cirtex Hosting
Use coupon "forum" for 50% Off!

Reply
 
LinkBack Thread Tools Display Modes
Old 05-03-2006, 06:27 PM   #1 (permalink)
Senior Googler
 
Join Date: Mar 2005
Location: South Georgia
Posts: 105
Thanks: 0
Thanked 0 Times in 0 Posts
tbrenner
Send a message via AIM to tbrenner Send a message via MSN to tbrenner
searching a mysql database

i'm trying to search a database and really have no clue where to start. i can connect to the database via php, that's about it. can anyone give me some sample code of a search or a tutorial? anything is welcomed...brbrthanksbr
tbrenner is offline   Reply With Quote
 
Sponsored Links
Old 05-16-2006, 12:33 AM   #2 (permalink)
Noogle
 
Join Date: May 2006
Location: Hungary
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
zslotyi
Hello tbrenner,

after connecting a database server(from php), you have to connect to a specific database to start a search.

this looks sg like:
$link = mysql_connect("localhost", "yourlogin", "yourpw")
or die("Could not connect");
mysql_select_db("your_db_name") or die("Could not select database");

you can start searching after this.

Searching looks sg like

SELECT "xyz" FROM your_table WHERE "zbd"

or from php
mysql_query("SELECT &bkfls;"xyz&bkfls;" FROM your_table WHERE &bkfls;"zbd&bkfls;"");

search criterias "xyz" and "zbd" can of course vary in a quite wide range. The most straightforward is this:

SELECT * FROM yourtable;

which gives you every record of your table.

Check out the MySql documentation, as that is a quite nice tutorial as well:
http://dev.mysql.com/doc/refman/5.0/en/tutorial.html

regards
zsl
zslotyi is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
More Information about SQL Database. sarpras Web Design, Coding & Programming Forum 0 01-17-2007 05:34 PM
Database Error sheepcentral GC Announcements 11 01-22-2006 02:14 PM
database conversion sipoor Web Design, Coding & Programming Forum 3 01-17-2006 05:10 PM
Pimp My Searching: Internet Movie Database Laurent Van Winckel All About Google 1 10-13-2005 08:24 AM
database conversion sipoor Web Design, Coding & Programming Forum 3 01-01-1970 02:02 PM


All times are GMT -8. The time now is 10:22 AM.


Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© 2004–2007 Google Community