At 10:56 AM +0200 4/24/01, Sven Heising wrote:
>Hi list
When posting help requests, it's always helpful to include the error
message you get. You can check quickly this via something like:
mysql_query("DELETE FROM $dtable where loginid = '$userto' ")
or
mysql_error();
One possible problem is that $dbuser doesn't have delete privileges
on $dbase on host $host. See the manual:
http://www.mysql.com/doc/P/r/Privilege_system.html
>got a problem again....can't delete :
>
>$db=mysql_pconnect($host,$dbuser,$pass) or
>die($dbfehler);
>echo "$userto";
>
>mysql_query("use $dbase;");
>
>mysql_query("DELETE FROM $dtable where loginid = '$userto' ");
>
>
>what is wrong with this?
>
>thanx in advance
>
>sven
>
The above might not be an actual snippet of your program, but it's
always good to check a query's success. For example:
function your_database_error_function() {
echo 'Database error: '.mysql_error();
exit;
}
...
$ResultId = mysql_query("DELETE FROM $dtable where loginid = '$userto' ");
if (!$ResultId) {
your_database_error_function();
}
...
-steve
--
+---------- KDVS 90.3fm Annual Fundraiser : 16 - 22 April 2001 ----------+
| Steve Edberg University of California, Davis |
| [EMAIL PROTECTED] Computer Consultant |
| http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ |
+----------------------------- www.kdvs.org -----------------------------+
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php