Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 15th, 2008, 08:15 AM
Registered User
 
Join Date: Feb 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Weird search

Hi, I have a script that searches on 1 field and I would like to make it searching for 10 fields but with this way:

field1 like $var1 AND field2 like $var2 etc...

I mean that I don't want it to search ALL variables at ALL fields with AND but each variable at one field.

Could someone please help me with an example?
If possible I would also like an example on how to add fields to SQL.

Thanks in advance.

Reply With Quote
  #2 (permalink)  
Old February 21st, 2008, 06:41 AM
Friend of Wrox
 
Join Date: Oct 2003
Location: colombo, WP, Sri Lanka.
Posts: 481
Thanks: 0
Thanked 3 Times in 3 Posts
Send a message via MSN to surendran Send a message via Yahoo to surendran
Default

hi

SELECT * FROM table WHERE MATCH(field1,field2,....) AGAINST('keyword')

surendran
(Anything is Possible)
http://ssuren.spaces.msn.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird Concantenation jazzcatone SQL Server 2000 1 November 14th, 2006 10:42 AM
weird problem! Please Help johnjohn Classic ASP Databases 5 December 21st, 2004 10:27 AM
Weird Errors kervinshim Classic ASP Databases 3 April 25th, 2004 04:08 AM



All times are GMT -4. The time now is 10:11 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.