|
||||||||||
|
|||||||
| GoogleCommunity Sponsor |
Use coupon "forum" for 50% Off! |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Senior Googler
![]() |
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
|
|
|
|
|
Sponsored Links
|
|
|
|
#2 (permalink) |
|
Noogle
![]() Join Date: May 2006
Location: Hungary
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
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 |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |