Welcome Guest, Not a member yet? Register   Sign In
mysql find question
#1

[eluser]alex646[/eluser]
Hello guys,

I'm trying to create a form, this form has 5 fields:

name
work
school
city
state

I have a db and all files working, except one thing:

I want to allow user to find a record if any of the form fields match, not necessarily all of them, any of the fields. I'm not sure how to go about it using active record or sql either : (

Please help : )

Thanks
#2

[eluser]bgreene[/eluser]
select * from tablename where ('name' like "Jobs") or ('work' like "Jobs") etc. use "Jo%" for partial match, read up on mysql
#3

[eluser]alex646[/eluser]
Thanks! I played with it and it works now : )




Theme © iAndrew 2016 - Forum software by © MyBB