php - Deleting row leaves empty cell? -


i'm running problem i'm trying delete row mysql table. code wrote :

$sql = "delete members name='$_post[delmember]'"; $retval = mysql_query($sql); if(!$retval) {     die("couldn't delete data: " . mysql_error()); } 

the code print database :

$sql = 'select name members'; $retval = mysql_query($sql, $conn); if(!$retval) {         die("couldn't data: " . mysql_error());     } while($row = mysql_fetch_array($retval, mysql_num)) {     if($col == $cols) {             $col = 0;             echo '</tr><tr>';         }         echo '<td align="center"><a class="stats" href="members.html?stats='.$row[0].'">' . $row[0] . '</a></td>';         $col++; } 

this 'empties' row, leaves empty cell shows when print data. have go phpmyadmin delete empty space manually. not understand why this.

i still beginner , programming hobby of mine, appreciate if give me clues , point me right direction.

thanks lot!

to better learn mysql syntax, fire console session of mysql , type commands directly. syntax looks correct, don't know rules of database you're using or view you're looking in.

it's hard tell if you're seeing artifact of phpmyadmin, or consequence of other aspect of database, or if it's consequence of code you're using "print" data.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -