troubleshooting Question

Having trouble with Searching a MySQL double to date conversion

Avatar of Jon C
Jon C asked on
PHPMySQL Server
5 Comments1 Solution476 ViewsLast Modified:
What I am trying to do is search a database  and display all the jobs that have been put on the system today.

I have an input page where you select the date:
<title>Jobs Today</title><center>
<h1>Jobs on the System Today</h1>
<p>Please select the date:</p>
</center>
<center>
<form action="jobs_today.php" method="get">
  <p>Day:
    <select name="day" id="day">
      <option selected="selected">01</option>
      <option>02</option>
      <option>03</option>
      <option>04</option>
      <option>05</option>
      <option>06</option>
      <option>07</option>
      <option>08</option>
      <option>09</option>
      <option>10</option>
      <option>11</option>
      <option>12</option>
      <option>13</option>
      <option>14</option>
      <option>15</option>
      <option>16</option>
      <option>17</option>
      <option>18</option>
      <option>19</option>
      <option>20</option>
      <option>21</option>
      <option>22</option>
      <option>23</option>
      <option>24</option>
      <option>25</option>
      <option>26</option>
      <option>27</option>
      <option>28</option>
      <option>29</option>
      <option>30</option>
      <option>31</option>
    </select>
  Month:
    <select name="month" id="month">
      <option selected="selected">01</option>
      <option>02</option>
      <option>03</option>
      <option>04</option>
      <option>05</option>
      <option>06</option>
      <option>07</option>
      <option>08</option>
      <option>09</option>
      <option>10</option>
      <option>11</option>
      <option>12</option>
    </select>
  Year:
    <select name="year" id="year">
      <option selected="selected">2013</option>
      <option>2014</option>
    </select>
  </p>
    <p><span class="cent">
    <input type="submit" name="submit" value="Submit" />
  </span></p>
</form>
</center>

When clicking submit I would like the page 'jobs_today.php' to display everything from the table 'JOBS' just from the date selected.

However the date is stored in the table 'orderno' in a the format double which would need to be converted.

So far my 'jobs_today.php' looks like this:

<?php 
$host_name = 'localhost'; 
$user_name = 'my_username'; 
$pass_word = 'password'; 
$database_name = 'my_database';  

$conn = mysql_connect($host_name, $user_name, $pass_word) or die ('Error connecting to mysql'); 
mysql_select_db($database_name); 

$query = "SELECT * FROM orderno WHERE date('1899-12-30 00:00:00'+ INTERVAL User5 * 24*3600 SECOND)";

$result=mysql_query($query);

$num=mysql_num_rows($result); 

?>

Any ideas how I can get the results to display from JOBS after selecting the day?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros