Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199903

Re: [PHP3] 0 is not a MySQL result index in cart.php3 on line 14 From: Remigiusz Sokolowski (rems <email protected>)
Date: 03/01/99

> here is my error warning:
>
> Warning: 0 is not a MySQL result index in
> /www/itsdave/ezshop/php-inc/cart.php3 on line 14
>
> here is the code
>
> <form method="<? print($method) ?>" action="<? print($SCRIPT_NAME) ?>">
> <?
>
> // Get contents of users cart
> $query = "Select * from cart where merchant_id = $merchant_id and session =
> '$session'";
> $select2 = mysql($database,$query);

I'm not mySQL user, but it seems, that command for getting result set is
mysql_db_query and mysql command is used for creating a connection to
mysql database, so You should have

        $conn = mysql($database);
        $select2 = mysql_db_query($conn, $query);

> $row=0;
> $rows=mysql_numrows($select2); // THIS IS LINE 14
> if($rows == 0){
>
> this is just a slight glimpse of the code.. if you need the whole thing i
> can send you a link where it can be downloaded...
>
> This shop cart came with zero install directions.. i am assuming thats why
> more experience is needed.. maybe you guys can shed some light to get me
> started.. gotta gain experience from something,
>
> Thanks,
>
> dave
>
>
>
> --
> PHP 3 Mailing List http://www.php.net/
> To unsubscribe send an empty message to php3-unsubscribe <email protected>
> To subscribe to the digest list: php3-digest-subscribe <email protected>
> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3
> List administrator: zeev-list-admin <email protected>
>
>
>

-------------------------------------------------------------------*------------
Remigiusz Sokolowski e-mail: rems <email protected> * *
-----------------------------------------------------------------*****----------

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive:  http://www.php.net/mailsearch.php3
List administrator:  zeev-list-admin <email protected>