I've sucessfully opened a MYSQL database  & trying to list / loop
through the records, however I'm getting this error :-

Unable to view data1aa


The code is :-

==========================

$num=mysql_numrows($result);

echo "NUMBER OF RECORDS - $num\n";

$i=0;

while ($i < $num) {

$ver=mysql_result($result,$i,"Verified") or die( "Unable to view
data1aa - \n" . mysql_error());
echo "VERIFIED - '$ver'\n";
$email1=mysql_result($result,$i,"Email") or die( "Unable to view
data1ab - \n" . mysql_error());
echo "Email - '$email1'\n";
$user=mysql_result($result,$i,"Username") or die( "Unable to view
data1ac - \n" . mysql_error());
echo "Username - '$user'\n";
$action="" or die( "Unable to view
data1ad - \n" . mysql_error());
echo "Action - '$action'\n";

}

==========================

The problem is that the "Verify" field contains a "0" (Integer) value
& other columns may be blank / no values at all..

If I 'remove' the "or die" sections - I dont get any results at all -
Just "server eror".....


Is there a way to loop through the records, and let my PHP script
decide what is a good value or not (Ie not cause any errors if a
column is blank / 0 value...)

--
G
Yahoo Archives by email = Yes
http://groups.kwister.com/owners.php#add
NZ community groups - [EMAIL PROTECTED]


Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list




SPONSORED LINKS
Php mysql Job postings


YAHOO! GROUPS LINKS




Reply via email to