note 61071 rejected from function.mssql-fetch-array by nlopess

From: Date: Tue, 24 Jan 2006 21:44:38 +0000
Subject: note 61071 rejected from function.mssql-fetch-array by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-102396@lists.php.net to get a copy of this message
Note Submitter: steve @ ubernoob dot com ---- Why does the following only give me the first word in the name or description when i echo it? // Connecting, selecting database $link = mysql_connect('info', 'info', 'info') or die('Could not connect: ' . mysql_error()); echo 'Connected successfully'; mysql_select_db('info') or die('Could not select database'); echo "<br><br>"; // Performing SQL query $query = "SELECT * FROM flora WHERE flora_id='$flora_id'"; $result = mysql_query($query) or die('Query failed: ' . mysql_error()); echo "Flora_id is '$flora_id'"; if (mysql_num_rows($result) <1) { $msg = "No Flora with that ID found!"; echo $msg; } // Ouputting data while ($row = mysql_fetch_array($result)) { $cn = $row['common_name']; $ln = $row['latin_name']; $org = $row['origin']; $id = $row['flora_id']; $des1 = $row['description_one'];

« previous php.notes (#102396) next »