Date: 08/21/01
- Next message: DevilKin: "Re: [PHP] Detecting empty query result?"
- Previous message: Boaz Yahav: "[PHP] 404 header"
- In reply to: Seb Frost: "[PHP] Detecting empty query result?"
- Next in thread: DevilKin: "Re: [PHP] Detecting empty query result?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Aug 21, 2001 at 02:54:33PM +0100, Seb Frost wrote:
> Basically I want to check to see if $fileDir is already in my database. I
> do this as:
>
> $result = mysql_query("SELECT fileDir FROM shoots WHERE
> (fileDir='$fileDir')");
>
> How do I check the result? I normally use
>
> mysql_result($result, $row, $field)
>
> to read my result, but if I try that I get an error:
>
> if(mysql_result($result, $row, $field))
>
> gives me:
>
> Warning: Unable to jump to row 0 on MySQL result index 3
>
>
> cheers,
>
> - seb
You're looking for: msql_num_rows()
Try:
http://www.php.net/manual/en/function.msql-num-rows.php
--* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renze <email protected> -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- Netherlands -- -- http://www.datalink.nl -- ««««««««««««««««««««««««
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: DevilKin: "Re: [PHP] Detecting empty query result?"
- Previous message: Boaz Yahav: "[PHP] 404 header"
- In reply to: Seb Frost: "[PHP] Detecting empty query result?"
- Next in thread: DevilKin: "Re: [PHP] Detecting empty query result?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

