Jochem Maas wrote:
Op 1/13/10 12:43 AM, Robert Cummings schreef:
deal...@gmail.com wrote:
On Jan 12, 2010, at 1:57 PM, Ashley Sheridan wrote:
Depends on how you're creating running the query. You could do
something like:
echo mysql_result($result, 1, 'fieldname');
Where $result is your res
Op 1/13/10 12:43 AM, Robert Cummings schreef:
>
> deal...@gmail.com wrote:
>> On Jan 12, 2010, at 1:57 PM, Ashley Sheridan wrote:
>>
>>> Depends on how you're creating running the query. You could do
>>> something like:
>>>
>>> echo mysql_result($result, 1, 'fieldname');
>>>
>>> Where $result is
deal...@gmail.com wrote:
On Jan 12, 2010, at 1:57 PM, Ashley Sheridan wrote:
Depends on how you're creating running the query. You could do
something like:
echo mysql_result($result, 1, 'fieldname');
Where $result is your result object and 1 is a 0 indexed array, so
would be the second r
On Jan 12, 2010, at 1:57 PM, Ashley Sheridan wrote:
Depends on how you're creating running the query. You could do
something like:
echo mysql_result($result, 1, 'fieldname');
Where $result is your result object and 1 is a 0 indexed array, so
would be the second result.
Thanks Ryan, Ashl
Daevid Vincent wrote on 13/01/2010 00:00:
Holy, Jesus, Marry and Joseph! You can't be serious with that?!
So you're going to loop over potentially hundreds or thousands of records
and only display one?
Wow. Speechless.
Either you're talking to dealtek or you didn't read my post very well:
"An
> -Original Message-
> From: Kim Madsen [mailto:php@emax.dk]
> Sent: Tuesday, January 12, 2010 2:17 PM
> To: deal...@gmail.com
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Display just 1 record in a query
>
> deal...@gmail.com wrote on 12/01/2010
deal...@gmail.com wrote on 12/01/2010 22:52:
I did a query... then I display records like:
Q: but how I i just display a particular record with out the do / while
loop?
Just use extract($row_cur); before the table starts. That would give you
first row onl
On Tue, 2010-01-12 at 13:52 -0800, deal...@gmail.com wrote:
> I did a query... then I display records like:
>
>
>
>
>
>
>
>
>
>
>
> Q: but how I i just display a particular record with out the do /
> while loop?
>
> like just the 2nd record only:
>
>
though you can fetch twice to get the 2nd row
$row_cur = mysql_fetch_assoc($cur); //skip 1st row
$row_cur = mysql_fetch_assoc($cur);
echo $row_cur['tid'];
you should really modify your sql statement, like 'select xxx from xx order
by xx limit 1, 1' (limit 1,1 retrieve your 2nd row if you are usin
9 matches
Mail list logo