[fpc-pascal] Documentation for sqldb
Adriaan van Os
fpc at microbizz.nl
Thu Jun 21 11:47:19 CEST 2007
Henry Vermaak wrote:
> On 20/06/07, Joost van der Sluis <joost at cnoc.nl> wrote:
>>
>> You mean how many rows are affected by the last query you've run? I saw
>> request for that earlier.
>>
>> But imho, you never need it. You always should know how many rows are
>> affected before you execute a query.
Of course not, what absurd nonsense.
It could be a debug-tool,
>> though.Maybe I could implement it. Maybe for one specific connection, or
>> maybe even in a general form.
>
> you can't always know, for instance if you do a conditional update:
> update programmers set overtime = 'yes' where work_hours > 80
>
> i've never used it in a program myself, but I've noted that there's an
> api function for this in mysql and there's the sql function
> ROW_COUNT() (in 5.0.1). i suspect there are similar functions for
> different flavours...
MySQL has mysql_affected_rows, Postgres has PQcmdTuples.
Regards,
Adriaan van Os
More information about the fpc-pascal
mailing list