| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| An American Soldier ![]() | php/mysql help -----SOLVED--------- I am in the middle of creating a search by letter script, except, i have ran into some trouble.. i want the user to be able to click a letter and it show all the results with that letter. no problem.. already done using.. PHP Code: this is what i believe it would have to look like but, we no its not going to work.. lol PHP Code:
__________________ Completely Free cPanel Hosting -- Deployed to Afghanistan -- "There is no such thing as rich over-night unless you owned Google stock in 2006" Last edited by -Ray-; 06-20-2008 at 10:07 AM. |
| |
| | #2 (permalink) |
| Traveller | select title where LEFT(title,1) = $yourletter http://dev.mysql.com/doc/refman/5.0/...#function_left
__________________ Internet.geek.nz NameCooler.com Unlimited Domain Name Web Hosting Travel Money Rates |
| |
| | #3 (permalink) |
| An American Soldier ![]() | thanks.. ill try that...
__________________ Completely Free cPanel Hosting -- Deployed to Afghanistan -- "There is no such thing as rich over-night unless you owned Google stock in 2006" |
| |
| | #4 (permalink) |
| Traveller | no problem, glad it worked, you could also use where title LIKE '$yourletter%' http://dev.mysql.com/doc/refman/5.0/...functions.html not sure which one is more efficient... edit: hey! you edited your post, did it not work after all?
__________________ Internet.geek.nz NameCooler.com Unlimited Domain Name Web Hosting Travel Money Rates |
| |
| | #5 (permalink) |
| An American Soldier ![]() | i trying it on function one... it worked... im trying it on function 2 now final code... works... thanks PHP Code:
__________________ Completely Free cPanel Hosting -- Deployed to Afghanistan -- "There is no such thing as rich over-night unless you owned Google stock in 2006" Last edited by -Ray-; 06-20-2008 at 10:06 AM. |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |