Answer the question
In order to leave comments, you need to log in
How to combine two queries into one?
Hello, please help in any way you can.
$idBDInU = 1;
$querySteansNews=mysql_query("SELECT pg.*, gn.* FROM participants_groups pg, groups_news gn WHERE pg.`id_participant` = '".$idBDInU."' AND pg.`id_groups` = gn.`id_group`");
$querySteansNews=mysql_query("SELECT zt.*, f.* FROM zapisi_text zt, friends f WHERE (f.`friend1` = '".$idBDInU."' AND zt.`to` = f.`friend2`) OR (f.`friend2` = '".$idBDInU."' AND zt.`to` = f.`friend1`)");
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question