Mailinglisten-Archive |
Hi, > $bla_querytext = "select * from kunden where Firma='$firma'"; > $bla_query = mysql_query ($bla_querytext, $conn); > $bla = mysql_affected_rows ($conn); > > if ($bla =="0"){ > > .... > > } else { > ... > > So funzt es eigentlich! FYI: <manual> mysql_affected_rows() returns the number of rows affected by the last INSERT, UPDATE or DELETE query on the server. mysql_num_rows() returns the number of rows in a result set. </manual> Letztere Funktion ist hier dein Freund. Also: $bla_querytext = "select * from kunden where Firma='$firma'"; $bla_query = mysql_query ($bla_querytext, $conn); $bla = mysql_num_rows ($bla_query); if ($bla =="0"){ ... } CU, Axel. -- FLYnet - FLYer Kommunikationsgesellschaft mbH Weender Landstr. 46 37073 Göttingen http://www.flynet.de a.tietje_(at)_flynet.de
php::bar PHP Wiki - Listenarchive