Echoing a value

From: Date: Mon, 12 Jul 2004 14:58:53 +0000
Subject: Echoing a value
Groups: php.general 
Request: Send a blank email to php-general+get-190238@lists.php.net to get a copy of this message
I'm having some trouble echoing a value to a file that is being pulled from a MySQL database. I've included my code below I'm sure it's something really simple but I'm not seeing it. $row['users.name'] and $row['users.company'] echo nothing while $row['cnt'] echoes it's expected values. If anyone can tell me what I'm doing wrong I'd appreciate it. Thanks, Ed $ap = fopen("$ad_path/AdCount$issue.txt", "w"); mysql_connect ($local_host, $local_user, $local_pass); mysql_select_db ($local_db); $result = mysql_query ("SELECT *, COUNT(*) as cnt FROM users, listings WHERE listings.user_id = users.id AND listings.active = '1' GROUP BY users.company, users.name"); if ($row = mysql_fetch_array($result)) { do { fputs($ap, $row['users.name']); fputs($ap, $sp); fputs($ap, $sp); fputs($ap, $row['users.company']); fputs($ap, $sp); fputs($ap, $sp); fputs($ap, $row['cnt']); fputs($ap, $nl); } while($row = mysql_fetch_array($result)); mysql_close(); } fclose($ap);

« previous php.general (#190238) next »