I did not quite get the point here, but maybe that's not needed to solve
the problem... :-)
First of all, you seem to have enabled the register_global setting,
since I can't see from where the parameter $id is posted. Use the $_GET
or $_POST superglobal array instead. Take big care of input filtering
also and do not put "dirty" data directly into your query.
Second, the function mysql_db_query() has been deprecated for a long
time now, use mysql_select_db() and mysql_query() instead.
I think your problem is in your while-loop:
You loop over the result set $result and fetch the row as an object.
Then you execute a delete statement and at the same time overwriting
your previous result set $result, thus you will break the loop with an
error that the provided parameter is not a result set.
I also guess you have a typo in your last statement where you (probably)
try to delete the gallery. I guess that you maybe want to use the
variable $galerie_id..? Well, I can't tell without any more information
about your application.
Krister Karlström, Helsinki, Finland
Ruprecht Helms wrote:
while($row = mysql_fetch_object($result))
Galerie_kultur WHERE GalerieID=$id");
$result=mysql_db_query("pferdeservice-karle","DELETE FROM Galerie WHERE
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php