Hi everybody
I have installed php4 and mysql on IIs winxp
I am trying to retrieve a password and print it using a query which is written as
followos
$query2 = select passwd from user where username = '$username';
$result = mysql_result($query2);
echo centerBOld Password was $result /B/center;
Hi everybody
I have installed php4 and mysql on IIs winxp
I am trying to retrieve a password and print it using a query which is
written as followos
$query2 = select passwd from user where username = '$username';
$result = mysql_result($query2);
echo centerBOld Password was $result /B/center;
am
Nope. Use this statement:
$result = mysql_query($query2);
The mysql_query() function actually performs the query to the db for you and
returns a resource with your result set contained within.
The mysql_result() function extracts the contents of a given cell from your
result set; it does not
Rich
thanx for answering
I did what you said yesterday before using mysql_resut it returns resource
id#3 didn't know what is it and how can i transform it it the data inside
the cell
i corrected the situation and i waited to give me res.id#3 but it doesn't
write anythingany suggestions ?
In a message dated 12/27/02 8:26:10 AM Pacific Standard
Time, [EMAIL PROTECTED] writes:
I am trying to retrieve a password and print it using
a query which is
written as followos
$query2 = select passwd from user where username =
'$username';
$result = mysql_result($query2);
echo
Yes, first you use:
$result = mysql_result($query2);
That will return something like resourceID #3. That's right. What you need
to do now is to use a function to access the resource. For example, if you
have a table named User with the following columns:
ID
username
passwd
and you want to
man i have tried everything the sentece is always printed without the
variable
don't know what is happening
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, 2002-12-27 at 04:19, Ehab El Maraghy wrote:
Hi everybody
I have installed php4 and mysql on IIs winxp
I am trying to retrieve a password and print it using a query which is
written as followos
$query2 = select passwd from user where username = '$username';
$result =
Aha! John, you're right. I remember stumbling over this the first time I
used it. Sorry for any confusion, Ehab.
More info here:
http://www.php.net/manual/en/function.mysql-result.php
-Original Message-
From: John Coder [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 27, 2002 2:09 PM