![]() |
![]() |
![]() |
||||
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. |
|
New Webmasters ask "How-To" questions here. This is where other fucking Webmasters help. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Sep 2008
Location: canada..............eh?
Posts: 850
|
![]() OK so lets say you have a table with 6 columns and you want to query with a pattern match on 4 columns. How do I do this?
I can produce accurate result with 1 column like this: SELECT * FROM tableName WHERE name LIKE '%pattern%' That works with one column like 'name' but if I wanted to query other columns like name,title,comment,ect how would I form this SQL statement? details: MySQL 5.0.77 Al cols are Latin_general_ci Ya I am a newbie with this stuff..... ![]()
__________________
need content? Email me for exclusive or semi-exclusive! sandraxxsyn @gmail.com |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#2 |
So Fucking Banned
Join Date: Aug 2008
Location: Just Blow Me
Posts: 10,551
|
bump 4 you
|
![]() |
![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: May 2005
Location: The Porn Land
Posts: 1,414
|
[QUOTE=lost&found;17182590]
SELECT * FROM Name WHERE name LIKE '%pattern%' That works with one column like 'name' but if I wanted to query other columns like name,title,comment,ect how would I form this SQL statement? Try this: SELECT Name, FROM table WHERE CONTAINS((COLUMN NAME 1, COLUMN NAME 2), '%pattern%'); |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Jan 2010
Location: Europe
Posts: 1,327
|
..or
..WHERE CONCAT(name,title,comment) LIKE '%name%'
__________________
icq: 395 294 346 http://www.adultsubmitter.eu - submit any adult site to 20 directories from 1 form! now 20 domains! http://www.porndeals.eu http://www.ebonybangbros.com |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: May 2005
Location: The Porn Land
Posts: 1,414
|
I forgot about CONCAT
![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#6 |
ICQ:649699063
Industry Role:
Join Date: Mar 2003
Posts: 27,763
|
Good luck with MySQL.
I would love to believe that you are the sexy woman in your avatar. Look! You can be multiplied by 2! What part of Canada are you from?
__________________
Send me an email: [email protected] |
![]() |
![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Sep 2008
Location: canada..............eh?
Posts: 850
|
BC and I am the girl in my avatar!
__________________
need content? Email me for exclusive or semi-exclusive! sandraxxsyn @gmail.com |
![]() |
![]() ![]() ![]() ![]() |