note 61071 added to function.mssql-fetch-array
| From: | steve at ubernoobdotcom | Date: | Tue, 24 Jan 2006 20:59:28 +0000 |
| Subject: | note 61071 added to function.mssql-fetch-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-102395@lists.php.net to get a copy of this message | ||
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'];
----
Server IP: 85.116.0.130
Probable Submitter: 88.105.243.1
----
Manual Page -- http://www.php.net/manual/en/function.mssql-fetch-array.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+61071
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61071&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61071&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61071&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61071&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61071&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61071&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61071&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+61071&report=yes
Search -- http://master.php.net/manage/user-notes.php