HI, I previously posted this in the Coding forum, but on reflection I think this one would be more appropriate. Plus nobody seemed to be able to answer my query.
I have two tables in a database called demo
table1:
+------+------+
| row1 | row2 |
+------+------+
| one1 | two2 |
+------+------+
table2:
+------+------+
| row1 | row2 |
+------+------+
| three | four4 |
+------+------+
and using this code i wanna select the value one1 from table1:
$db = mysql_connect("localhost","root");
mysql_select_db("demo",$db);
$test = "one1";
$query = mysql_query("SELECT a.*, b.* FROM table1 a, table2 b WHERE a.row1='$item' AND b.row1='$item'",$db);
$get = mysql_fetch_array($query);
but i'm not getting any results at all when echoing, any ideas?
Thanks
Ant