Posted by Kim Andrι Akerψ on 10/09/06 11:08
Sonnich wrote:
> Hi!
>
> I simply need to check for wtether my SQL request returns any data -
> any row = yes.
>
> AFAIK there is no other way than:
>
> // if any row exist
> if(odbc_fetch_row($result2))
> {
> bla.....
>
> BR
> Sonnich
Since you're using ODBC, why not use odbc_num_rows()?
http://php.net/odbc_num_rows
Like this:
if (odbc_num_rows($result2) > 0) {
// bla bla bla
}
--
Kim AndrΓ© AkerΓΈ
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
Navigation:
[Reply to this message]
|