Hi,
try something like this:
<?
// Verbindung zum SQL-Server herstellen
$conn_id = mysql_connect("localhost","root");
if ($conn_id) {
echo "Verbindung zum SQL-Server hergestellt";
} else {
echo "Konnte Verbindung nicht aufbauen!";
echo mysql_error();
exit;
}
if (mysql_select_db("akademie", $conn_id)) {
if (!mysql_query("delete from kurs where Kursbezeichnung='bla'"))
echo "Datensatz sollte geändert sein";
} else {
echo "Es scheint ein Fehler aufgetreten zu sein!";
echo mysql_error();
}
} else {
echo "Konnte keine Datenbank auswaehlen!";
echo mysql_error();
}
?>
Then you should get the error messages displayed if the deletion failed.
Good luck!
Ruprecht Helms wrote:
>
> Hi,
>
> I have the problem that this script should delete one recordset within the
> kurs-table where Kursbezeichnung = 'bla'. One recordset exists with this
> criteria in the table. But the script do not delete it.
>
> What is wrong
>
> <?
> // Verbindung zum SQL-Server herstellen
>
> mysql_connect("localhost","root");
> echo "Verbindung zum SQL-Server hergestellt";
> mysql_select_db("akademie");
> mysql_db_query("akademie","delete from kurs where
> Kursbezeichnung='bla';");
> mysql_error();
> echo "Datensatz sollte geändert sein";
> ?>
>
> The ; I have tried to make away, but this is no reason.
>
> Regards,
>
> Ruprecht
>
> ---
> Sent through Global Message Exchange - http://www.gmx.net
>
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread3282@stripped
>
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail mysql-unsubscribe@stripped instead.
--
Viele Gruesse, regards,
Jens Ellegiers
---------------------------------------------------------------
FORD-Werke AG, Koeln
Jens Ellegiers PROFS: JELLEGIE EMAIL: jellegie@stripped
Engineer (I-Engine CAE) Phone: +49-221-90-31467
Mail Sym: D-ME/PN-112 Fax : +49-221-90-33025