php - Distinguishing ID's
187
This is my query:
$tsql = "SELECT *
FROM
dbo.messages m INNER JOIN
dbo.contacts c
ON m.contactID = c.ID
WHERE
assigned='{$_COOKIE['member_name']}'
ORDER BY
m.status DESC, m.ID DESC";
This returns the contact ID but not the message ID. How do I get it to show:
<?php echo $row['ID'] ?>
But with the message ID and not the contact ID in an HTML form?
Answer
Solution:
you can access id of c table using cid, and id of m table as mid
like $row['cid'] and $row['mid']