Mysql field len

Ceviz Viki, özgür ansiklopedi

Git ve: kullan, ara
mysql_fetch_len

Sorgudan dönen sonuç tablosundaki belirtilen satırdaki hücrede yer alan karakter sayısını döndürür.

Kullanımı;

int mysql_field_len ( resource $result , int $field_offset )

Örnek:

<?php
$result = mysql_query("SELECT id,email FROM people WHERE id = '42'");
if (!$result) {
echo 'Could not run query: ' . mysql_error();
exit;
}
 
// Will get the length of the id field as specified in the database
// schema.
$length = mysql_field_len($result, 0);
echo $length;
?>