General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 11th, 2003, 03:41 AM
thecharking thecharking is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 187 thecharking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to thecharking
search help

OKAY so I was wondering what the problem is here.

i try this

PHP Code:
 $limitquery $query_in " WHERE username LIKE %$searchName% LIMIT 0," $perpage


$query_in is select * from users, and the other variables jsut set up for page settings.

they work because I can do this without the search.

when I search though, I get an error.

it is echoing out the proper variable. Is something wrong with this?

and I really just want to get a search page done. I have posted on this before... and got responses, and they were good, but I jsut can't figure out where to begin. Well I have begun, but,...

I am passing the variables though the url, so do i jsut do a query for each variable passed and in each combination? that seems so difficult. Any suggesations would be great. But the firs step is figureing out why my basic search wasn't working.
thanks guys
__________________
hey it's the CHARKING

Reply With Quote
  #2  
Old July 11th, 2003, 06:29 AM
digitallysmooth digitallysmooth is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Posts: 788 digitallysmooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 21 sec
Reputation Power: 7
Try removing the comma after the limit 0 part.
__________________
__________________________________________________ _
Wil Moore III, MCP | Integrations Specialist | Senior Consultant
Are You Listed...? | DigitallySmooth Inc.

Reply With Quote
  #3  
Old July 11th, 2003, 08:16 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
You probably need quotation marks around your search value, outside the percent signs. Also, I'd recommend actually not removing the comma after 0. It's there because you're expecting a value in $perpage. If you remove the comma (by, say, prepending it to the $perpage value) and $perpage isn't passed, you'll just get no results, since you'd be limiting your result set to 0. If you leave the comma where it is, at least you'll get a syntax error if $perpage isn't passed. Or, of course, you could add some code above the query that tested for $perpage and rewrote the LIMIT statement according to what you got. That'd probably be the best thing to do.

Reply With Quote
  #4  
Old July 11th, 2003, 11:20 AM
digitallysmooth digitallysmooth is offline
you know how we do
Dev Articles Novice (500 - 999 posts)
 
Join Date: Jun 2002
Posts: 788 digitallysmooth User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 34 m 21 sec
Reputation Power: 7
Looks like dhouston is right... I didn't catch the
PHP Code:
'%$searchName%' 

Reply With Quote
  #5  
Old July 11th, 2003, 01:34 PM
thecharking thecharking is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 187 thecharking User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to thecharking
thanks guys

once again you guys rock. I really should have seen that gosh. sorry to post to hastily. :P

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > search help


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT