PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 15th, 1999, 11:51 PM
kumars
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I am trying to make a PHP search query into a mySQL database.
I used $query="select * from table where (
item LINK %$searchitem%)";

here $searchitem is an variable with the keyword value.

It was working with out the where clause.. can some one help.

Thank you

Reply With Quote
  #2  
Old August 16th, 1999, 12:21 AM
jpenix
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
Just watch your syntax - I see a number of errors in what you typed (both in the message text and in its subject).

Assuming you're working with alphanumeric data, format your search as follows:

SELECT * FROM table WHERE item LIKE '%$searchitem%'

Reply With Quote
  #3  
Old August 16th, 1999, 12:49 AM
kumars
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I retyped the script and tried again still not working. I am not sure I am passing the query string properly
This is what my query string looks like
$query = "SELECT * FROM table WHERE (productcode LIKE '%$keywork%')";

I am still not getting, I am not sure what i am missing. It works I I remove the WHERE clause.

Any help is appreciated.

Suresh

Reply With Quote
  #4  
Old August 16th, 1999, 12:58 AM
kumars
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
It is working, I found a small problem with my column name in the mySQL table.

Thanks for the help.,

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > select * from while ( id like "%123%" )

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap