note 60617 deleted from function.mysql-field-len by betz

From: Date: Thu, 12 Jan 2006 14:10:03 +0000
Subject: note 60617 deleted from function.mysql-field-len by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-101628@lists.php.net to get a copy of this message
Note Submitter: Patrick ---- The example over there is wrong. In the first example someone coppied an wrong function in line 9 _mysql_fetch_len()_ This will be correct: <?php $result = mysql_query("SELECT id,email FROM people WHERE id = '42'"); if (!$result) { echo 'Abfrage konnte nicht ausgeführt werden: ' . mysql_error(); exit; } // Liefert die Länge des Wertes in email, zum Beispiel // würde user@example.com die Länge von 16 ergeben $length = mysql_field_len($result, 'email'); echo $length; ?>

« previous php.notes (#101628) next »