Jump to content

Fetching data from 2 mysql tables with the same column name


eMonk

Recommended Posts

I'm running a mysql select query and just found out both tables have a same column.

 

This is the column both tables have which is city_id:

 

$city_id = $row['city_id'];

 

I tried the following but it didn't work:

 

$city_id = $row['tablename.city_id'];

 

How can I do this?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.