|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Aug 2006
Messaggi: 1262
|
[php] mysql_fetch_row
devo contare le righe da una tabella:
while ($row = mysql_fetch_row($report)) { $a ++; } ma poi devo stamparle, solo che dovrei "ricaricare" il tutto, come posso fare? infatti se poi faccio while ($row = mysql_fetch_row($report)) { echo'<td> <b>Link:</b> <a href="'.$row[1].'" target="_blank"> '.$row[2].' </a> </td>'; } non cé nessun dato grazie |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Mar 2006
Città: Bergamo
Messaggi: 2499
|
__________________
ho concluso con: kvegeta, doctordb, Leland Gaunt.
|
|
|
|
|
|
#3 |
|
Senior Member
Iscritto dal: Aug 2006
Messaggi: 1262
|
giusto cosi quindi?
$a = mysql_affected_rows($report); perché non funziona |
|
|
|
|
|
#4 |
|
Senior Member
Iscritto dal: Mar 2006
Città: Bergamo
Messaggi: 2499
|
incolla qui tutto il codice
__________________
ho concluso con: kvegeta, doctordb, Leland Gaunt.
|
|
|
|
|
|
#5 |
|
Senior Member
Iscritto dal: Aug 2006
Messaggi: 1262
|
$a = mysql_affected_rows($report);
$b = 0; while ($row = mysql_fetch_row($report)) { if($a > 5) { $b++; if($b > 1) $b = 0; } if($b == 0) echo'<tr>'; echo'<td> <b>Link:</b> <a href="'.$row[1].'" target="_blank"> '.$row[2].' </a> </td>'; $id = mysql_query(" SELECT id FROM $name "); echo' <td> <form action="include/delete.php" method="post"> <input type="submit" value="delete"> <input type="hidden" name="id" value='.$id.'> </form>'; echo 'bravo'.$id.'ecco'; echo' </td>'; if($b == 0) echo'</tr>'; echo'<br /><br />'; }; echo' </table>' ; |
|
|
|
|
|
#6 |
|
Senior Member
Iscritto dal: Nov 2003
Messaggi: 980
|
mysql_num_rows, non mysql_affected_rows, visto che stai facendo una SELECT
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 15:02.











ho concluso con: kvegeta, doctordb, Leland Gaunt.









