php-db | 2002122
Date: 12/27/02
- Next message: Doug Coning: "[PHP-DB] Upload Images..."
- Previous message: janet <email protected>: "Re: [PHP-DB] a newbie in deep need for help"
- In reply to: Ehab El Maraghy: "Re: [PHP-DB] A newbie in deep need for help"
- Next in thread: Doug Coning: "[PHP-DB] Upload Images..."
- Reply: Doug Coning: "[PHP-DB] Upload Images..."
- Reply: Ehab El Maraghy: "Re: [PHP-DB] A newbie in deep need for help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 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
set
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.
Rich
-----Original Message-----
From: Ehab El Maraghy [mailto:e_elmaraghy <email protected>]
Sent: Friday, December 27, 2002 12:24 PM
To: php-db <email protected>
Subject: Re: [PHP-DB] A newbie in deep need for help
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 anything any suggestions ? from my part i will revise the code
once again
waiting for your reply thanx
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: Doug Coning: "[PHP-DB] Upload Images..."
- Previous message: janet <email protected>: "Re: [PHP-DB] a newbie in deep need for help"
- In reply to: Ehab El Maraghy: "Re: [PHP-DB] A newbie in deep need for help"
- Next in thread: Doug Coning: "[PHP-DB] Upload Images..."
- Reply: Doug Coning: "[PHP-DB] Upload Images..."
- Reply: Ehab El Maraghy: "Re: [PHP-DB] A newbie in deep need for help"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

