RE: [PHP-DB] questions related to MySQL
| From: | Sam Masiello | Date: | Wed, 26 Jul 2000 15:26:06 +0000 |
| Subject: | RE: [PHP-DB] questions related to MySQL | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-1521@lists.php.net to get a copy of this message | ||
You might want to peruse the functions defined at:
http://www.php.net/manual/ref.mysql.php
This outlines all of the MySQL functions and what they return from their
being called. For example, mysql_query returns either a TRUE or FALSE
depending on whether or not the query succeeded....so you don't want to echo
$var in your case because it will not yield the correct information. Take a
look at mysql_result or mysql_fetch_array for that particular case.
HTH
Sam Masiello
System Analyst
Chek.Com
(716) 853-1362 x289
smasiello@chekinc.com
-----Original Message-----
From: ROUSSY, ISABELLE [mailto:isabelle.roussy@bell.ca]
Sent: Wednesday, July 26, 2000 11:19 AM
To: php
Subject: [PHP-DB] questions related to MySQL
Hello,
first question :
If I retrieved an entire tuple in a variable like select *.... is there
a way to display the fields I want using only the query select * (a kind
of read_next _field or something )or I really have to store every field
I need fetching the information using a specific query select th_field
from ...
second question :
can I just display the result of a query. exemple I'm just trying to
display a specific field $var=mysql_query("select field from...) wich is
a char type, then just echo $var and all it displays is " Resource id #2
"!!!
--
Isabelle Roussy
Bell Canada
IS/IT - Billing Requirements
700 de La Gauchetiere W B8W2 Montreal Qc H3B 4L1
Mailto:isabelle.roussy@bell.ca
Office (514) 391-7939 Fax (514) 393-8162
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net