MySQL 4.0.15 versus MySQL 4.0.16-nt

This is a discussion on MySQL 4.0.15 versus MySQL 4.0.16-nt within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi to the readers, This script : works on phpMyAdmin 2.5.3 MySQL 4.0.15 (Easy PHP) ==== $minusInt = (int)($...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-20-2004
Québec
 
Posts: n/a
Default MySQL 4.0.15 versus MySQL 4.0.16-nt

Hi to the readers,


This script :
works on phpMyAdmin 2.5.3 MySQL 4.0.15 (Easy PHP)
====
$minusInt = (int)($_SERVER['QUERY_STRING']);

$result = mysql_query("SELECT * FROM etudiants WHERE date >
DATE_SUB(NOW(), INTERVAL $minusInt DAY);");
$result1 = mysql_query("SELECT * FROM commentaires WHERE date >
DATE_SUB(NOW(), INTERVAL $minusInt DAY);");
$result2 = mysql_query("SELECT * FROM cours WHERE date >DATE_SUB(NOW(),
INTERVAL $minusInt DAY);");
$result3 = mysql_query("SELECT * FROM peinture_plein_air WHERE date >
DATE_SUB(NOW(), INTERVAL $minusInt DAY);");

$num_results = mysql_num_rows($result);
echo "<p>etudiants found: ".$num_results."</p>";

$tmpName = $tmpName2 = '';
echo "<p>";
for ($i=0; $i <$num_results; $i++)
{
$row = mysql_fetch_array($result);
echo "</p>";
echo "<p>".($i+1).". nom: ";
echo stripslashes($row["nom"]);
echo "</strong><br>image: ";
echo stripslashes($row["image"]);
echo "<br>passe: ";
echo stripslashes($row["passe"]);
echo "<br>tel: ";
echo stripslashes($row["tel"]);
}

==
but dont work on my online server
phpMyAdmin 2.5.3-rc2 MySQL 4.0.16-nt

I tried others possibilities

$result = mysql_query("SELECT * FROM etudiants WHERE date > NOW()-
'$minusInt';");

DATE_SUB(NOW(), INTERVAL '$minusInt, DAY);");
DATE_ADD...


what can I do?

Jean Pierre


Reply With Quote
  #2 (permalink)  
Old 10-25-2004
Québec
 
Posts: n/a
Default Re: MySQL 4.0.15 versus MySQL 4.0.16-nt

Solved

"Québec" <Once@WasEno.ugh> a écrit dans le message de
news:ogzdd.8012$_P6.84009@weber.videotron.net...
> Hi to the readers,
>
>
> This script :
> works on phpMyAdmin 2.5.3 MySQL 4.0.15 (Easy PHP)
> ====
> $minusInt = (int)($_SERVER['QUERY_STRING']);
>
> $result = mysql_query("SELECT * FROM etudiants WHERE date >
> DATE_SUB(NOW(), INTERVAL $minusInt DAY);");
> $result1 = mysql_query("SELECT * FROM commentaires WHERE date >
> DATE_SUB(NOW(), INTERVAL $minusInt DAY);");
> $result2 = mysql_query("SELECT * FROM cours WHERE date >DATE_SUB(NOW(),
> INTERVAL $minusInt DAY);");
> $result3 = mysql_query("SELECT * FROM peinture_plein_air WHERE date >
> DATE_SUB(NOW(), INTERVAL $minusInt DAY);");
>
> $num_results = mysql_num_rows($result);
> echo "<p>etudiants found: ".$num_results."</p>";
>
> $tmpName = $tmpName2 = '';
> echo "<p>";
> for ($i=0; $i <$num_results; $i++)
> {
> $row = mysql_fetch_array($result);
> echo "</p>";
> echo "<p>".($i+1).". nom: ";
> echo stripslashes($row["nom"]);
> echo "</strong><br>image: ";
> echo stripslashes($row["image"]);
> echo "<br>passe: ";
> echo stripslashes($row["passe"]);
> echo "<br>tel: ";
> echo stripslashes($row["tel"]);
> }
>
> ==
> but dont work on my online server
> phpMyAdmin 2.5.3-rc2 MySQL 4.0.16-nt
>
> I tried others possibilities
>
> $result = mysql_query("SELECT * FROM etudiants WHERE date > NOW()-
> '$minusInt';");
>
> DATE_SUB(NOW(), INTERVAL '$minusInt, DAY);");
> DATE_ADD...
>
>
> what can I do?
>
> Jean Pierre
>
>



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:29 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0