I have the following tables:
Tabla 1
----------
id
*fk_ciudades
datoX1
datoX2
Tabla 2
----------
idCiudades
nombreCiudades
And I want to make a query that selects one of the rows of Table 1 , when
a variable x that I pass, is equal to the name of one of the cities in Table 2 . The problem is that I do not know how to build WHERE
to achieve that.
I thought that putting "WHERE *fk_ciudades = $varx"
was enough to reference the names of the cities in Table2, but I have not succeeded.
It's possible? Or am I being a victim of bad plan planning?