$query1= mysql_query("select PageId FROM page");
$result = mysql_query("SELECT * FROM page");

echo "<td><a href='http://localhost:1234/usman/page_update_insert.php'>
        <img src='IMG/create.png'>Add New Record</a>  </td>";
        echo "<table border='0'>

<tr class='tableheader'>
while($row = mysql_fetch_array($result)) {
        echo "<tr class='tablerow'>";
        echo "<td>" . $row['PageId'] . "</td>";
        echo "<td>" . $row['MenuName'] . "</td>";
        echo "<td>" . $row['ParentMenuId'] . "</td>";
        echo "<td>" . $row['LinkWidth'] . "</td>";
        echo "<td>" . $row['OtherUrl'] . "</td>";

want to show title from abc table instead of pageid from page

3 Years
Discussion Span
Last Post by rjusman90

I think the only real way for you to do this would be to run two queries and create a variable for the field from the other table. That is probably your simplest way, if I have understood you correctly.

So like where you have your query text, just have two, named $query1 and $query2.

First run the first one which gets everything, then run your second one in the same way and store the single field to a variable.

Let me know if you need further help.


Edited by jakizak: Typo


Do we have any relations form the two tables rjusman90? I mean abc and page,as it may be an efficient way though as scaasiboi suggested you may try it...

Edited by Bile


Hey scaasiboi

Its' not necessary that we need to run two queries. But condtion is that there need to be some common so we can apply the join in sql.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.