Help on mysql_field_flags?

From: Date: Tue, 10 Oct 2000 12:28:45 +0000
Subject: Help on mysql_field_flags?
Groups: php.general 
Request: Send a blank email to php-general+get-19319@lists.php.net to get a copy of this message
Hi all, How could I check on the field name and data to find out whether they are Primary Key or not in order not to show them on the form. Can I use mysql_field_flags function? I tried to do this statement, it didn't work. What are the problems, any ideas? Thanks in advance. $sql = "SELECT * FROM Project"; $result = mysql_query($sql, $db); $rows = mysql_num_rows($result); $fields = mysql_num_fields($result); for ($y = 0; $y < $fields; $y++) { if(!mysql_field_flags($result, $y) = "PRI") { $title= mysql_field_name($result, $y) echo $title; } else { exit; } for ($i = 0; $i < $rows; $i++) { for ($y = 0; $y < $fields; $y++) { if(!mysql_field_flags($result, $y) = "PRI") { $data= mysql_result($result, $i, $y) echo $data; } else { exit; } } } Calvin

« previous php.general (#19319) next »