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:

and you want to perform a query that just returns the password, your code
would look like something like this:

$query2 = "select passwd from user where username = '$username'";//query
$result = mysql_query($query2);//perform the query and return result set
$thisPass = mysql_result($result);//return one column (passwd) from result
echo"<p>".$thisPass."</p>"; //this line would just echo out the variable
$thisPass to the browser to show you what it contains.

Try that code and see if it works for you. If not, respond and paste all of
the code you're working with and I'll see if I can find what's going wrong.


-----Original Message-----
From: Ehab El Maraghy [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 27, 2002 12:24 PM
Subject: Re: [PHP-DB] A newbie in deep need for help

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   but it doesn't
write anything    any suggestions  ? from my part i will revise the code
once again
waiting for your reply   thanx

PHP Database Mailing List (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to