Re: How can I capture just the first record in a found set and edit it?
| From: | Jasper Kips | Date: | Thu, 08 Jan 2015 20:08:59 +0000 |
| Subject: | Re: How can I capture just the first record in a found set and edit it? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-324231@lists.php.net to get a copy of this message | ||
> Op 8 jan. 2015, om 19:00 heeft DealTek <dealtek@gmail.com> het volgende geschreven:
>
> semi newbie
>
> Hi all,
>
> 1 - I do a query for multi records - and sort a certain way
>
> 2 - then I need to capture/edit just the first found record in the result (no user interaction)
>
>
>
> Q: using php - How do I set a variable to the first first found record in the result and do
> more with this record?
>
>
>
> --
> Thanks,
> Dave - DealTek
> dealtek@gmail.com
> [db-15]
>
Just do a fetch once. See the php manual for the fetch syntax for your specific DBMS.
Manipulate the data, and do an update query. See the manual for your specific DBMS.
That is really all there is to it
Sincerely,
Jasper Kips