Har min følgende kode, hvor jeg gerne vil have to querys i variablen 'res'. Hvad fejler min kode?
- <?php
- $con=mysql_connect("localhost","cpeaibos_orengo","orengo123") or die("connection error");
- mysql_select_db("cpeaibos_companyDB",$con) or die ("Fejlmeddelse #dbfail ");
-
- $region=$_REQUEST['region'];
- $area=$_REQUEST['boligstr'];
- $cleaningtype=$_REQUEST['boligstr'];
-
- //echo $query="SELECT * FROM $region inner join worktype on company.c_id=worktype.c_id inner join work on worktype.w_id=work.w_id WHERE size_m2 = '$area'";
- $query="SELECT * FROM $region WHERE size_m2 = '$area'";
- $query2="SELECT * FROM $region WHERE cleaningtype = 1";
-
-
- $res=mysql_query($query,$query2);
-
-
- if($res && mysql_num_rows($res))
- { ?>
Jeg får fejlmeddelelsen Warning: mysql_query() expects parameter 2 to be resource, string given in /home/sggibos/public_html/blablabla