Re: [PHP-DB] Maintain MySQL Transactions

2002-02-09 Thread Paul DuBois

At 2:00 +0800 2/10/02, Jason Wong wrote:
>On Sunday 10 February 2002 00:21, Miles Thompson wrote:
>>  Unless there has been a very recent development, MySQL doesn't support
>>  transactions. Use PostgreSQL, DB, etc.
>
>The v4 series of MySQL does support transactions.

MySQL has supported transactions since version 3.23.17.  At that time
BDB tables were the only transaction-capable type.  InnoDB tables were
added in version 3.23.34a.

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




Re: [PHP-DB] Maintain MySQL Transactions

2002-02-09 Thread Jason Wong

On Sunday 10 February 2002 00:21, Miles Thompson wrote:
> Unless there has been a very recent development, MySQL doesn't support
> transactions. Use PostgreSQL, DB, etc.

The v4 series of MySQL does support transactions.


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
Without love intelligence is dangerous;
without intelligence love is not enough.
-- Ashley Montagu
*/

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




Re: Re: [PHP-DB] Maintain MySQL Transactions

2002-02-09 Thread Jeroen Timmers

you must first connect to the mysql database,

for example

  $dbhost = "localhost";
  $dbuser = "DATABASE USER";
  $dbpass = "DATABASE PASSWORD";
  $database = "DATABASE NAME";
  @mysql_connect($dbhost, $dbuser, $dbpass) or die ("Deze pagina is
tijdelijk offline.");
  @mysql_select_db($database) or die ("Deze pagina is tijdelijk offline.");

after the connect you need to query the stuff

for example

$result = mysql_query("select * from table where id > 5");
while ($row = mysql_fetch_array($result))
{
  echo $rij[0];
  echo $rij[id];
}

/* delete query */'
$result = mysql_query("delete from table where id = 1");
$nr = mysql_affected_rows($result);

echo $nr . "rows are deleted.";

i hope you have enough info

the examples are not tested.

Jeroen Timmers.

http://www.php.net/manual/en/ref.mysql.php
- Original Message -
From: "Hayan Al Mamoun" <[EMAIL PROTECTED]>
To: "Jeroen Timmers" <[EMAIL PROTECTED]>
Sent: Saturday, February 09, 2002 12:54 PM
Subject: Re: Re: [PHP-DB] Maintain MySQL Transactions


> I have two sql statements, and I want to execute them all or
> nothing at all.
> For an example
> 1- Delete * from sometable where Id=SOMETHING
> 2- insert into OtherTable (fieldlist) values (valuelist) where
> Id=SOMETHING.
> How can I do so?
>
>
>
>
> 
> Get your own "800" number
> Voicemail, fax, email, and a lot more
> http://www.ureach.com/reg/tag
>
>
>  On Sat, 9 Feb 2002, Jeroen Timmers ([EMAIL PROTECTED])
> wrote:
>
> > what would you like todo?
> > explain further
> >
> > Jeroen
> > - Original Message -
> > From: "Hayan Al Mamoun" <[EMAIL PROTECTED]>
> > To: "PHPList (E-mail)" <[EMAIL PROTECTED]>
> > Sent: Saturday, February 09, 2002 7:51 AM
> > Subject: [PHP-DB] Maintain MySQL Transactions
> >
> >
> > > Hi, How can I maintain MySQL transactions with PHP
> > >
> > > Best Regards
> > > Hayan
> > >
> > >
> > > --
> > > 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




Re: [PHP-DB] Maintain MySQL Transactions

2002-02-09 Thread Miles Thompson


Unless there has been a very recent development, MySQL doesn't support 
transactions. Use PostgreSQL, DB, etc.

Miles Thompson


At 09:51 AM 2/9/2002 +0300, Hayan Al Mamoun wrote:
>Hi, How can I maintain MySQL transactions with PHP
>
>Best Regards
>Hayan
>
>
>--
>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




Re: [PHP-DB] Maintain MySQL Transactions

2002-02-09 Thread Jeroen Timmers

what would you like todo?
explain further

Jeroen
- Original Message - 
From: "Hayan Al Mamoun" <[EMAIL PROTECTED]>
To: "PHPList (E-mail)" <[EMAIL PROTECTED]>
Sent: Saturday, February 09, 2002 7:51 AM
Subject: [PHP-DB] Maintain MySQL Transactions


> Hi, How can I maintain MySQL transactions with PHP
> 
> Best Regards
> Hayan
> 
> 
> -- 
> 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] Maintain MySQL Transactions

2002-02-08 Thread Hayan Al Mamoun

Hi, How can I maintain MySQL transactions with PHP

Best Regards
Hayan


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