Answer the question
In order to leave comments, you need to log in
How to determine true mysql query?
I have a query $respr1= mysql_query("SELECT * FROM `do65i_k2_items` WHERE a='$a' and b='$b'");
I want to build a condition where you can define a trye or false request, well, that is, if () what to write in brackets ??
Answer the question
In order to leave comments, you need to log in
php.net/manual/ru/function.mysql-query.php - there is a warning and an answer to your question, I strongly recommend reading from beginning to end
There is no unequivocal advice here - everyone goes crazy according to their sexual orientation. Some create domains of a specific type and return values of those specific types.
For how to return a value depending on defined (or vice versa undefined) field values, read this manual https://dev.mysql.com/doc/refman/5.1/en/control-fl...
I most often use a very simple method. I'll rewrite your request for it:
If the query returns a non-zero value, then true. All other cases mean "not true", i.e. false.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question