?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

?
?Re: Search in PHP
Author:??(---.bluecom.no)
Date:???07-14-03 05:41

Okay... there are some ways to search a mysql table:
first of all you got the basic function with where... like "SELECT * FROM tablename WHERER field='NAME'"

If you don't know the whole name, you can use the LIKE function - then mysql will get the result where there is a match. Eg:
"SELECT * FROM tablename WHERE field LIKE '%NAME%'"

Use the % in front of the variable and after the vairable... then if you are trying to find a user with the name Joe Johnson you can search for Johns.

Take a look at the tutorials on this page (onphp.org) to learn how to conect, retrive, add ande delte in mysql!

If you are going to publish your script read the chapter about security in the php manual... I think it's chaper 5!

Good luck!

?Topics Author? Date
?Search in PHP??new
usman javed 07-14-03 04:35?
?Re: Search in PHP??new
? 07-14-03 05:41?
Go to Top??|??Go to Topic??|??Flat View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
??wrote: > > Okay... there are some ways to search a mysql table: > first of all you got the basic function with where... like > "SELECT * FROM tablename WHERER field='NAME'" > > If you don't know the whole name, you can use the LIKE > function - then mysql will get the result where there is a > match. Eg: > "SELECT * FROM tablename WHERE field LIKE '%NAME%'" > > Use the % in front of the variable and after the vairable... > then if you are trying to find a user with the name Joe > Johnson you can search for Johns. > > Take a look at the tutorials on this page (onphp.org) to > learn how to conect, retrive, add ande delte in mysql! > > If you are going to publish your script read the chapter > about security in the php manual... I think it's chaper 5! > > Good luck! ">??

Provided By
Phorum