|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Join Date: Jun 2002
Location: france
Posts: 996
|
mysql question
i have a table with 1 column (authors) in this form:
row1: ..,Sam,Jhon_Wilson,Mike,Terry,... row2:...,Dona,Jhon,Wilson,David,... row2:...,Jenny,Barbara,Anderson,... i want to make a select: select from books where authors like '%,Jhon_Wilson,% in order to retourn the fist row but this select is returning both rows (first row with ,Jhon_Wilson, and second row with ,Jhon,Wilson,) what is the correct sintax to retourn only the fist row? |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Apr 2006
Posts: 4
|
Oh wow...you should never have a table with data like that. Anyway... add LIMIT 1 onto the end of your sql.
|
|
|
|
|
|
#3 |
|
Rock 'n Roll Baby!
Join Date: Sep 2004
Location: USA, temporarly
Posts: 22,562
|
bad idea....
I just think you missed one ' try this query: SELECT FROM books WHERE authors like '%,Jhon_Wilson,%';
__________________
Sig for sale. Affordable prices. Contact me and get a great deal ;) My contact: ICQ: 944-320-46 e-mail: manca {AT} HotFreeSex4All.com |
|
|
|
|
|
#4 |
|
The Profiler
Industry Role:
Join Date: Oct 2002
Location: ICQ 76281726 and I'm female
Posts: 14,618
|
Jhon or John?
|
|
|
|