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)($...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 > > |