PC Zone > Programming
Help MYSQL Query
(1/1)
lovecardasda6: 12-03-17 11:42 AM
Meron po akong dalawang table
--------------------------------------------------------------------------------
(1)destionation_table
-id
-destination
-----------------------
 | id   | destination  |
------------------------
 | 1    | Cebu          |
 | 2    | Bohol          |
 | 3    | Leyte          |
------------------------
--------------------------------------------------------------------------------
(2)routes_table
-id
-from_destionation_id (references on destination_table.id)
-to_destination_id      (references on destination_table.id)
----------------------------------------------------------
  |  id  | from_destination_id | to_destination_id  |
---------------------------------------------------------
 | 1     | 2                           | 1                         |
 | 2     | 3                           | 1                        |
----------------------------------------------------------

--------------------------------------------------------------------------------

Paano po eretrieve and destion using the routes_table?

Desire output po ay dapat ganito

-------------------------------------------
 | from_destination | to_destination  |
-------------------------------------------
 | Bohol                 | Cebu               |
 | Leyte                 | Cebu               |
-------------------------------------------

eetrek: 12-03-17 11:54 AM
select * from
Pages: [1]
Back

WEB VERSION CLICK HERE
Home | Search
Page created in 0.037