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 8689187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:34:44+00:00 2026-06-12T23:34:44+00:00

please help to find a a mistake: The result is the Query is empty!

  • 0

please help to find a a mistake: The result is the Query is empty! I do not where the problem might come, actually I know that something might be wrong mysql_querry:

<?php
include("connect.php");
?>
<?php
$result = mysql_query("SELECT PEOPLE.ID AS ID, 
                            PEOPLE.NAME AS NAME, 
                            TICKETS.TICKETID AS TICKET_NO, 
                            RECEIPTS.DATENEW AS TICKET_DATE, 
                            PAYMENTS.TOTAL AS MONEY, 
                            CUSTOMERS.NAME AS CUSTOMER, 
                            PAYMENTS.PAYMENT AS PAYMENT
        FROM PEOPLE, RECEIPTS 
        INNER JOIN TICKETS ON RECEIPTS.ID = TICKETS.ID 
        INNER JOIN PAYMENTS ON RECEIPTS.ID = PAYMENTS.RECEIPT
        INNER JOIN CUSTOMERS ON TICKETS.CUSTOMER = CUSTOMERS.ID
        WHERE TICKETS.PERSON = '.$ID.'");
if ($num > 0 ) {
$i=0;
while ($i < $num) {
        $ID = stripslashes(mysql_result($result,$i,"ID"));
        $ID = stripslashes(mysql_result($result,$i,"ID"));
        $NAME = stripslashes(mysql_result($result,$i,"NAME"));
        $TICKET_NO = stripslashes(mysql_result($result,$i,"TICKET_NO"));
        $TICKET_DATE = stripslashes(mysql_result($result,$i,"TICKET_DATE"));
        $MONEY = stripslashes(mysql_result($result,$i,"MONEY"));
        $CUSTOMER = stripslashes(mysql_result($result,$i,"CUSTOMER"));
        $PAYMENT = stripslashes(mysql_result($result,$i,"PAYMENT"));

    $row .= '<tr>
    <td><a href="update.php?ID='.$ID.'">'.$ID.'</a></td>
    <td><a href="update.php?NAME='.$NAME.'">'.$NAME.'</a></td>
    <td><a href="update.php?TICKET_NO='.$TICKET_NO.'">'.$TICKET_NO.'</a></td>
    <td><a href="update.php?TICKET_DATE='.$TICKET_DATE.'">'.$TICKET_DATE.'</a></td>
    <td><a href="update.php?MONEY='.$MONEY.'">'.$MONEY.'</a></td>
    <td><a href="update.php?CUSTOMER='.$CUSTOMER.'">'.$CUSTOMER.'</a></td>
    <td><a href="update.php?PAYMENT='.$PAYMENT.'">'.$PAYMENT.'</a></td>
    <td><a href="delete.php?ID='.$ID.'">Delete</a></td>
    </tr>';

++$i; }} else { $row = '<tr><td colspan="2" align="center">Nothing found</td></tr>'; 
}

mysql_close();
?>
<table border="1" cellpadding="3" cellspacing="0"><? echo $row ?></table>

I much appreciete your support!

  • 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-06-12T23:34:47+00:00Added an answer on June 12, 2026 at 11:34 pm

    $ID value is empty you must assign value in it.

    Secondly, you’re checking $num>0 where but what is the value of $num?

    From my point of view your are trying to get the count of rows fetch.

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

Sidebar

Related Questions

Please help me to find out error in my SQL query. I have created
can you please help me to find the problem: I want to implement simple
Could you please help me find out the time complexity of the Fleury' algorithm
ereg and eregi functions will be deleted from Php. Please help to find alternatives
Please help me, I'm trying to find some documentation about pre-installed applications at Android.
Could you please help me out to find the correct deceleration rate for the
I cannot find where the sqlcmd is? i just want the prompt. please help!
I have one intresting requirement to achieve. could you please help? Please find the
Please help me with this update query. I COMPLETELY understand how redundant this is
Please help me find a way to embed the relational views of a database

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.