Have a look at the mysql functions in the PHP manual - i.e.
http://uk.php.net/mysql_query
I'm also certain this question has been raised fairly recently on the list. All
mysql_query is going to do is either open up the resource or not. You'll need to use
something else to display the data.
For example:
$sql = "select * from members";
if(!$result = mysql_query($sql))
echo mysql_error();
while($row = mysql_fetch_array($result))
{
echo $row['column_name'];
}
HTH,
Michael Egan
-----Original Message-----
From: Harlequin [mailto:[EMAIL PROTECTED]
Sent: 30 June 2004 12:42
To: [EMAIL PROTECTED]
Subject: [PHP] MySQL QUERY Results Not Appearing[Scanned]
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
-----------------------------
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
The information contained in this email (and in any attachments sent with it) is
confidential. It is intended for the addressee only. Access to this email by anyone
else is unintended and unauthorized.
If you are not the original addressee, 3tc asks you to please maintain
confidentiality. If you have received this email in error please notify 3tc
immediately by replying to it, then destroy any copies and delete it from your
computer system.
Any use, dissemination, forwarding, printing or copying of this email by anyone except
the addressee in the normal course of his/her business, is strictly prohibited. 3tc
owns the copyright in this email and any document created by us and assert the right
to be identified as the author of it. Copyright has not been transferred to the
addressee.
We protect our systems with Sophos Anti-virus -
www.sophos.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php