![]() |
| ||
| 3 condition query Hi, Im only used to basic sql queries. wonder if anyone can help with the below - or at least get me pointing in the direction of the correct resource to solve. I have a table, with fields a,b,c,d,e,f I need to run a query that shows from the above table all matches to 3 conditions in this order.. display if a = condition1 and b = condition2 and e is less than or equal to the value in e my problem is whilst Im able to write these queries seperate, Im struggling to write the query as one without getting errors. Can anyone help - either suggest how the query should look, or point me to some resource.. many thanks. |
| ||
| Re: 3 condition query what have you tried? The logical query would be where a = condition1 and b = condition2 and e <= something but since we don't know what condition1 and condition2 are we can't give much more help. So post your actual code if you want better help. |
| ||
| Re: 3 condition query </form> Hi, thanks for that - I think Ive posted this correct Ive added what you suggested how I think it should be written.. it seems awfully short yet sensible - can you confirm you think I have written it correctly.. after the huge number of errors my last attempt got, I thought Id check Im understanding you prior to trying it again. Thanks again. Especially for the quick response.. |
| ||
| Re: 3 condition query could you please tell me if i can have around 10 conditions in a singel query |
| ||
| Re: 3 condition query could you please tell if i can havea round 10 conditions in a single query i want to create a multi condition search script |
| ||
| Re: 3 condition query $condition1 = @$_GET['cond1'] ; Should look somehting more like that. Not used php for ages so it may not be work but I think you need a book and learn the basics of SQL and PHP before putting them together |
| All times are GMT -4. The time now is 5:15 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC