Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6169847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:55:37+00:00 2026-05-23T22:55:37+00:00

I have used inner join in my php page. Problem is when I fire

  • 0

I have used inner join in my php page. Problem is when I fire query in mysql query browser it fetches nearly 6 rows. and all are correct but when I use same in my php page it fetch only one row. That is only one value..

while($row=mysql_fetch_array($result1))
{   
while ($resultpoet = mysql_fetch_array($poet)) {
    ?>
    <tr>
        <td><?= $iCounter?>
            . </td>
        <td><? if(($row['roman']=="")&&($row['hindi']=="")) { ?>
            <?=$row['name'] ?>
            <? } else { ?>
            <a href="sview.php?title=<?=$row['sid'] ?>">
            <?=$row['name'] ?>
            </a>
            <? } ?></td>
        <td width="216"><? 

 if($resultpoet['pstatus']!='u')
 print '<a href="pview.php?title='.$resultpoet['pname'].'">'.$resultpoet['pname'].'</a>';
else 
 print $resultpoet['pname'];

            ?>



            </td> 
        <td width="135"><?=$row['category'] ?></td>
        <td width="67"><a href="songtitle_action.php?title=<?=$row['sid'] ?>"> Edit </a>
            <input name="check[]" type="checkbox" value="<?=$row[s_id]?>" id="checkbox_<?=$row[sid]?>"></td>
        <td width="75"><?  if(($row['roman']=="")&&($row['hindi']=="")) { ?>
            <a href="song_add_lyrics.php?title=<?=$row['sid'] ?>"> Add Lyrics</a>
            <? } ?></td>
    </tr>
    <? }
            $iCounter++;
         }?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:55:38+00:00Added an answer on May 23, 2026 at 10:55 pm

    You are only calling mysql_fetch_array once, so you only get one row.

    You need to instead iterate using while and do your output for each of the rows returned by the query. This is a pretty simplistic example:

    $poet= mysql_query("SELECT  p.name as pname, p.status as pstatus from poet p INNER JOIN song s ON p.pid=s.pid");
    while ($resultpoet= mysql_fetch_array($poet)) {
       if($resultpoet['pstatus']=='u')
         print '<a href="pview.php?title='.$resultpoet['pname'].'">'.$resultpoet['pname'].'</a>';
       else 
         print $resultpoet['pname'];
    }
    

    Check out the documentation for mysql_fetch_array, the example code elaborates on this principle.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this query: SELECT p.id, r.status, r.title FROM page AS p INNER JOIN
I have the following MySql query: select t1.* from Table1 t1 inner join Table2
I am facing problem with Inner join in Access Database. I have two table
I used a query like select a.email,b.vuid from user a ,inner join group b
I am trying to return all MSFT Lync Users who have used voice conferencing
I have a make table query that is used to run a report (due
I have this mysql query that I am trying to analyze. It is very
Using PHP and mySQL. I have 4 total tables, AgencyInfo, TypeCodes, PrimarySta and MutualAid.
I have used traditional version control systems to maintain source code repositories on past
I have used IPC in Win32 code a while ago - critical sections, events,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.