seany123 Posted June 26, 2009 Share Posted June 26, 2009 is there a way to remove a row via a php query.... for example: $salequery3 = $db->execute("update `points_market` remove row where `id`=?", array($seller['id'])); or something like that? Link to comment https://forums.phpfreaks.com/topic/163814-solved-quick-little-bit-of-help/ Share on other sites More sharing options...
SetToLoki Posted June 26, 2009 Share Posted June 26, 2009 is there a way to remove a row via a php query.... for example: $salequery3 = $db->execute("update `points_market` remove row where `id`=?", array($seller['id'])); or something like that? you mean DELETE? <?php $sql = sprintf("DELETE FROM points_market WHERE id='%s'", $seller['id']); $salequery3 = $db->execute($sql); ?> Link to comment https://forums.phpfreaks.com/topic/163814-solved-quick-little-bit-of-help/#findComment-864330 Share on other sites More sharing options...
Maq Posted June 26, 2009 Share Posted June 26, 2009 What do you mean remove a row? Why don't you just set the value to the default value, null, blank, etc...? Link to comment https://forums.phpfreaks.com/topic/163814-solved-quick-little-bit-of-help/#findComment-864331 Share on other sites More sharing options...
seany123 Posted June 26, 2009 Author Share Posted June 26, 2009 because... im echoing all rows in a table... and once one row becomes invalid.. i want it completely removed. Link to comment https://forums.phpfreaks.com/topic/163814-solved-quick-little-bit-of-help/#findComment-864363 Share on other sites More sharing options...
SetToLoki Posted June 26, 2009 Share Posted June 26, 2009 because... im echoing all rows in a table... and once one row becomes invalid.. i want it completely removed. delete will delete it from your database, but sounds like you just don't want invalid rows to print to your page but remain in database? It might be because I am tired but I don't think I understand what you are trying to do Link to comment https://forums.phpfreaks.com/topic/163814-solved-quick-little-bit-of-help/#findComment-864364 Share on other sites More sharing options...
seany123 Posted June 27, 2009 Author Share Posted June 27, 2009 i just want the row to be deleted from the database. its fixed now thanks. Link to comment https://forums.phpfreaks.com/topic/163814-solved-quick-little-bit-of-help/#findComment-864711 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.