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? Quote 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); ?> Quote 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...? Quote 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. Quote 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 Quote 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. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.