Re: MySQL QUERY Results Not Appearing
| From: | Craig Donnelly | Date: | Sat, 30 Jun 2001 12:58:29 +0000 |
| Subject: | Re: MySQL QUERY Results Not Appearing | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-189293@lists.php.net to get a copy of this message | ||
$result is an array that has to be fetched...try this
echo "<h3>active members should appear here</h3>";
$query = mysql_query("SELECT * FROM RegisteredMembers") or die("could not
execute query");
while($result = mysql_fetch_array($query)){
echo $result['YOUR_DB_FIELDNAME'];
}
change YOUR_DB_FIELDNAME' to whatever the fields are you are querying.
you could also:
<pre>
<?php print_r($result); ?>
</pre>
HTH
Craig
"Harlequin" <michael.mason@arraspeople.co.uk> wrote in message
news:20040630114124.8114.qmail@pb1.pair.com...
> Hi all...
>
> Despite being able to make a connection to the server and execute a query
I
> am unable to do this through PHP using the following commands:
>
> echo "<h3>active members should appear here</h3>";
> $query = "SELECT * FROM RegisteredMembers";
> $result = mysql_query($query) or die ("could not execute query");
> echo "$result";
>
> Any ideas...?
>
> --
> -----------------------------
> Michael Mason
> Arras People
> www.arraspeople.co.uk
> -----------------------------