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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:43:40+00:00 2026-06-09T15:43:40+00:00

When I tring to run this code any result not showing.Please help me …

  • 0

When I tring to run this code any result not showing.Please help me

… some code is here…

$result = mysql_query("select  *  from dataform where  date between '" . $d1 . "' and '" . $d2 . "'");

if (!$result) {
    echo 'No result';
}
else{
    echo $d1;
    echo $d2;
    echo "<table class=\"hovertable\">";

    echo "
<tr onmouseover=\"this.style.backgroundColor='#ffff66';\" onmouseout=\"this.style.backgroundColor='#d4e3e5';\">";

    echo "<th>File No</th>";
    echo "<th>Manufactor</th>";
    echo "<th>Address</th>";
    echo "<th>Supplier</th>";
    echo "<th>Place Site</th>";
    echo "<th>Tender Ref</th>";
    echo "<th>Award No</th>";
    echo "</tr>";
    while ($row = mysql_fetch_array($result)) {
        echo "<tr onmouseover=\"this.style.backgroundColor='#ffff66';\" onmouseout=\"this.style.backgroundColor='#d4e3e5';\">";
        echo "<th>" . $row["fileno"] . "</th>";
        echo "<th>" . $row["manufacture"] . "</th>";
        echo "<th>" . $row["address"] . "</th>";
        echo "<th>" . $row["sup"] . "</th>";
        echo "<th>" . $row["placesite"] . "</th>";
        echo "<th>" . $row["tenderref"] . "</th>";
        echo "<th>" . $row["awardno"] . "</th>";
        echo "</tr>";
    }
  • 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-09T15:43:41+00:00Added an answer on June 9, 2026 at 3:43 pm

    Try escaping your column DATE with backtick ` because it is a MySQL Data type. Another Suggestion is avoidusing string concatenation of your query because it is prone to mysql injection. Use PHP PDO or MYSQLi.

    Example of using PDO:

    <?php
    $stmt = $dbh->prepare("SELECT * FROM dataform WHERE  `date` BETWEEN ? AND ?");
    
    $stmt->bindParam(1, $d1);
    $stmt->bindParam(2, $d2);
    
    $stmt->execute();
    
    $result = $stmt->fetchAll(PDO::FETCH_ASSOC); //Fetch all results in form of associative array.
    
    ?>
    

    Remember to always sanitize your inputs.

    UPDATE 1

    You are not checking for condition in your WHILE loop. The way you are doing now is you are assign a value which is wrong. Try using ==

    instead of

    while ($row = mysql_fetch_array($result))
    {
    
    }
    

    change it to this

    while ($row == mysql_fetch_array($result))
    {
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run this command here: f = open(|ffmpeg -i /Users/joaoh82/Desktop/teste.MP4) result
I wonder if any of you could help with this problem. The following code
I'm trying to run this code but this error appear: Uncaught TypeError: string is
I'm trying to run this code: let coins = [50, 25, 10, 5, 2,1]
I am trying to run this code: ItemTaxonomy iTaxonomy = from itemTaxonomy in connection.ItemTaxonomy
I am trying to run this code : exec myStoredProcedure Cast('c5b48202-36af-4597-9780-5366d4188f55' AS uniqueidentifier), 744,
I am trying to run this seemingly simple piece of code which is repeated
Trying to convert this c code into MIPS and run it in SPIM. int
I am trying to run this tutorial i did not implement the validation part
Hi I am trying to run this query in SQL but it is not

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.