Hello.
Tell me how to make a data sample from a table with several conditions. I now have this:
select name from b_iblock_element where iblock_id = 9 and created_by = ". $ _ request [" UserID "]
I need to add one more condition in the query. Adding one more and at the end did not help.
How to write correctly if you need to check the record of 3, 4 or 5 fields?
Answer 1, Authority 100%
respond to 2 questions immediately. Quotes are required, as in the example I wrote
select `field` from` table` What `field` = 'a' and` field2` = 'b' And `Field3` = '3'
Write also through and. The fact is that newcomers are used to without obligatory pitchers, because In 99% of cases ‘rolling’. Here, take to write as I wrote. I here, for example, when I am writing something long folding the conditions in the array, and already in the request they do implode.
Hopefully explained the