You see, I am carrying out a project little by little and I have found a doubt that requires knowledge of sql and the truth is that I know the basics ...
I need an ajax request to make me a select that returns the fields of 2 tables, but one of those tables. I need a single field ...
I put the structure
Table Artist
id | name | user | password | mail | phone | genre | locality | description | web | photo
Event Table
id artist_id | title | date | description | date_event
Both tables relate by artist id - event id_artista
So far I've tried sentences like ...
SELECT * FROM artista a, evento e WHERE a.nombre = "paco" AND e.id =26
Ésta no me valía, ya que no necesito uno en concreto, sino todos los artistas que han creado eventos... y por ello requiero de su nombre, que está en la tabla artista.
SELECT * FROM artista a, evento e;
ésta me devuelve todos los campos de ambas tablas, y yo solo necesito el nombre...
I want the entire event table ... and from the Artist table only the name ... how can I do it?
I appreciate the inconvenience. Thanks