Posts tagged PHP/MySQL
Q&A: PHP/MYSQL CASE QUESTION?
Oct 2nd
Question by Timbuktu:
PHP/MySQL case question?
in my search engine script, i have the “select * from table1 where column1 like %$ _POST[search]% or column2 like etc”. But when i conduct the search, things appear to be case sensitive. For example, when searching for date, e.g. June, if i typed june, i could not find anything, only if i typed June.
i could use the “strtoupper” function like:
$ _POST[search]=strtoupper($ _POST[search]); before the query above, and then search all in CAPS?
any other solutions which will make things case insensitive?
or put differently: how do you make a query result case insensitive?
Read More >>
PHP/MYSQL ROW COUNTING FUNCTION?
Sep 6th
So I have a site and everything works fine and at some time in the script there is a mysql request “SELECT * FROM…” and so on and I want if the result is an empty row to display text and else display the data.At the moment no matter the return data from server it still echoes the table with results(it’s a search engine), but only the heading, as it is out of the loop cycle used to write each row of the results.I use the $query = “
Thanks,I did not know there was such a function.Now that I know about it it’s child’s play to alter my script.
Read More >>
PHP/MYSQL CASE QUESTION?
Apr 25th

in my search engine script, i have the “select * from table1 where column1 like %$_POST[search]% or column2 like etc”. But when i conduct the search, things appear to be case sensitive. For example, when searching for date, e.g. June, if i typed june, i could not find anything, only if i typed June.
i could use the “strtoupper” function like:
$_POST[search]=strtoupper($_POST[search]); before the query above, and then search all in CAPS?
any other solutions which will make things case insensitive?
or put differently: how do you make a query result case insensitive?
Read More >>