$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'>
    <th>PageName</th>
    <th>MenuName</th>
    <th>ParentMenuId</th>
    <th>LinkWidth</th>
    <th>OtherUrl</th>
    <th>Status</th>
    <th>CreatedDate</th>
    <th>OnMainMenu</th>
    <th>FooterMenu</th>
</tr>";
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

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.

Jack

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...

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.

by appling join we can not insert update delete

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.