Good, I'm glad it worked!!!

I see a lot of people using mysql_fetch_array().....

Which is fine...But I'm more into Object Oriented programming...and 
that's why I always use mysql_fetch_object()....

Good luck!!!


Dan


On Wednesday, January 23, 2002, at 11:45 AM, [EMAIL PROTECTED] wrote:

> My thanks for your quick response!
>
> Here's the problem I'm dealing with:
>
> I am inserting info with a unique identifier that auto-increments, then 
> take
> that ID and place it into another table for later reference.
>
> I was trying to use something like:
>
> $query="select var1 from table1 where var2='$var3'
>             and var4='$var5'";
>
> $somevar=mysql_query($query) or die.. yada yada
> echo $somevar;
>
> I tried your code, and it works wonderfully!  Thanks so much. :)
>
> J. Wharton
> [EMAIL PROTECTED]
>
> ----- Original Message -----
> From: "Dan Brunner" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, January 23, 2002 12:21 PM
> Subject: Re: [PHP-DB] Resource Id #2
>
>
>> Use something like this...
>>
>> ...
>> ...
>> ...
>> $rows = mysql_num_rows($result);
>> for ($y = 0; $y < $rows; $y++){
>> $data = mysql_fetch_object($result);
>>
>> echo $data->Field_Name;
>> ...
>> ...
>> ...
>>
>> }
>>
>>
>> A Little more code would Help!!!
>>
>>
>>
>>
>> On Wednesday, January 23, 2002, at 10:56 AM, [EMAIL PROTECTED] wrote:
>>
>>> I'm having a problem with retrieving data from MySQL databases. I can
>>> input
>>> with no problems, but when I try to pull the data back out (single
>>> field)
>>> and echo it I get something showing up saying Resource Id #2.  Any
>>> ideas?
>>>
>>>
>>>
>>>
>>>
>>> --
>>> PHP Database Mailing List (http://www.php.net/)
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>> To contact the list administrators, e-mail: php-list-
>>> [EMAIL PROTECTED]
>>>
>>
>>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to