No need to apologize, I should have worded my first post better.
You are quite correct, replacing the = with LIKE solved my problem, thank you for your help.
You'll have to forgive me, as I am a total newbie to mysql, the actual mysql SELECT statement is :-
SELECT * FROM catches
WHERE name = 'colname' AND pegno = 'colpeg' AND specie = 'colspecie'
ORDER BY name ASC
'colname' , 'colpeg' , 'colspecie' are my 3 variables, and in the dropdown boxes...
Thank you, I have tried using LIKE instead of %, but it returns nothing.
Its not perl, but PHP, but its the mysql part of the query that I am struggling with, hence the post in this forum.
mysql code:
$query_rsName = sprintf("SELECT * FROM catches WHERE name = '%s' AND pegno = '%s' AND specie...
I am having a problem with a mysql where statement, using a PHP page I have 3 drop down boxes, each with a SELECT DISTINCT statement in them, all these work ok in selecting the distinct value.
I have set in each of these an initially selected label of "All", with a value of %.
On my results...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.