Jump to content

Delete from DB?


cooldude832

Recommended Posts

so you want to delete a user from all tables in a database?

 

so it would remove the account ad all posts maid emails or whatever data your dealing with?

 

hrmm i havent seen anything to that extent

 

maybe loop an array as the table

 

<?
// includes
include("../header.php");


// open database connection
$conn = mysql_connect(HOST, DBUSER, PASS) or  die('Could not connect !<br />Please contact the site\'s administrator.');
$db = mysql_select_db(DB) or  die('Could not connect to database !<br />Please contact the site\'s administrator.');

// generate and execute query
$UserID = mysql_escape_string(trim(htmlentities($_GET['UserID'])));

$table = 

newmysql_query("DELETE FROM $table WHERE UserID = '$UserID'") 
or die(mysql_error()); 
echo newmysql_query;


echo mysql_query;
?>

Link to comment
https://forums.phpfreaks.com/topic/147495-delete-from-db/#findComment-774282
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.