Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 15th, 2008, 08:15 AM
Registered User
 
Join Date: Feb 2008
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.

 
Old February 21st, 2008, 06:41 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 479
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





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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.