Re: [PHP-DB] General UPDATE question

2005-06-17 Thread balwant singh

it will update all rows which fulfills the criteria.

With Best Wishes

Balwant Singh

INDO ASIAN FUSEGEAR LTD.
A-39, HOSIERY COMPLEX
PHASE - II EXTN., NOIDA
PH: +91 - 120 - 2568 472 / 093 -098
FAX: +91 - 120 - 2568 473
WEB : www.indoasian.com



Ron Piggott wrote:


Does the UPDATE command only change one row or each occurance if the the
criteria repeat itself through the table?

 



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] General UPDATE question

2005-06-17 Thread Bastien Koert

each occurance if it matches the criteria

bastien


From: Ron Piggott [EMAIL PROTECTED]
Reply-To: Ron Piggott [EMAIL PROTECTED]
To: PHP DB php-db@lists.php.net
Subject: [PHP-DB] General UPDATE question
Date: Fri, 17 Jun 2005 01:26:27 -0400

Does the UPDATE command only change one row or each occurance if the the
criteria repeat itself through the table?

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Pear DB with Sybase sqlanywhere

2005-06-17 Thread mikee

Hello,

Is this the correct group for questions about Pear DB?

I'm trying to connect with a Sybase dabase and I'm getting Cannot 
connect: DB Error: extension not found on the 
sybase://me:pass/host/dbname DSN.


I am able to connect with a MySQL using Pear DB so I'm assuming I need 
some sybase libraries.


Can anyone point me in the right direction?

Thanks

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: Pear DB with Sybase sqlanywhere

2005-06-17 Thread mikee

mikee wrote:

Hello,

Is this the correct group for questions about Pear DB?

I'm trying to connect with a Sybase dabase and I'm getting Cannot 
connect: DB Error: extension not found on the 
sybase://me:pass/host/dbname DSN.


I am able to connect with a MySQL using Pear DB so I'm assuming I need 
some sybase libraries.


Can anyone point me in the right direction?

Thanks


Here is the code

$dsn = sybase://name:[EMAIL PROTECTED]/dbname;
$db = DB::connect( $dsn );
if( DB::isError( $db ))
  etc.

Thanks

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: UPDATE command

2005-06-17 Thread Ron Piggott
This is kind of interesting ...

$query=SELECT * FROM quiettimequotation WHERE used = 0 ORDER BY RAND()
LIMIT 1;

works;

$query=SELECT * FROM bibleverses WHERE 'used' = 0 ORDER BY RAND() LIMIT 1;

doesn't!  Having the ' around used makes that select command fail --- but
the UPDATE command requires it!

Thanks for those of you who responded to my question below.  I am creating a
mailing list for my web site that I am wanting each entry which is randomly
selected from the database to only be used once and not be available again
until the entire list has been used.  I needed the UPDATE command to change
the used column all back to 0 again once the last entry had been selected
from the database.  I think I like programming mySQL stuff :)  Ron

---

Does the UPDATE command only change one row or each occurance if the the
criteria repeat itself through the table?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php