domingo, 22 de marzo de 2015

consultando 2 tablas en un solo query

mysql> select audio_id,list_id from audio,list limit 0,1;
+----------+---------+
| audio_id | list_id |
+----------+---------+
|       18 |      79 |
+----------+---------+
1 row in set (0.00 sec)


mysql> select audio_unique,phone from audio,list  where audio_id=19 and list_id=94 limit 0,10;
+---------------+-------------+
| audio_unique  | phone       |
+---------------+-------------+
| 550f0e92e434e | 18097342323 |
+---------------+-------------+
1 row in set (0.00 sec)

No hay comentarios:

Publicar un comentario