0
Hello, in a classified site with PHP and Mysql I made through Ajax the insertion of the state and the city. When selecting the state is passed the id
and it sends to the file getcity.php that makes the select
and returns the respective city, thus entering the ID’s in the bank.
TABELA tb_estado CAMPOS id|int e uf|varchar(2)
TABELA tb_cidade CAMPOS id|int e id_estado_fk|int e cidade|varchar(100)
But now in the bank id
the state 26 and the city 4773 as display the name of the state SP and the city Bauru?
NOTE* I already make one INNER JOIN
with the user id to display the city/state that the so-and-so registered, but is in the ad.
TABELA tb_anuncio CAMPOS id|int e id_usuario_fk|int e estado_fk|int(10) e cidade_fk|int(10)
On the page it looks like this: Inserted in: 23/08 Location: 4773/26
How can I get the names on the table?
Igor, you can include in the question the
SELECT
what are you doing to get this data? Thank you.– bfavaretto
Igor, edit your question with the table design and edit also the title it makes no sense.
– Marco Souza
Did you solve your problem with the answer? Or do you need some more information?
– viana