Hi Werner,
--
On Mon, 2 Jul 2001 15:59:19 Werner Stuerenburg wrote:
>Hi noelt,
>
>
>> i mean, the value of the duration field will be transferred or
>> copied to the consumed field w/c is in a diff. table.
>
>So these are just some fields like column1 and column2 - nothing
>to do with duration of the process itself.
yes your right.
>
>The following is in php and uses class db_mysql - there are
>numerous other ways to do it, just to show you how I would do it:
>
>$db = newDB($db);
>//connect to database
>
>$q = "SELECT * FROM table 1
> WHERE key1 = 'value1'";
>//state query, try insert
>$db->query($q);
>//perform query
>if ($db->nf()){//success
> $db->next_record();//get record
> $field1 = $db->f('field1');//extract field
>}
>//now look at the other table
>$q = "INSERT INTO table2
> (col1, col2, col3) //and so on
> VALUES ('$field1', '$field2', '$field3')";
>//state query
>$db->query($q);
>//perform query
>if ($db->Errno){//entry already there
> $q = "UPDATE table2
> SET val1 = '$field1',
> val2 = '$field2',
> val3 = '$field3',
> WHERE key2 = '$field1'";//assuming that this is a key element
> //do an update instead
> $db->query($q);
>}
>
this is good. many thanks...
>> perl? can you elaborate more on this, i mean i know perl but can you give me more
>ideas...
>
>Personally, I prefer php to perl, but it is a matter of taste and
>experience. There is an entertaining article entitled MySQL Wizardry
>at address
same with you, i prefer php rather than perl.
>
> http://mysql.com/articles/wizard/
>
>which shows how to work with databases and perl. Highly
>recommended.
many thanks Werner!
>
>--
>Herzlich
>Werner Stuerenburg
>
>_________________________________________________
>ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
>Tel 0(049) 5224-997 407 7 Fax 0(049) 5224-997 409
>http://pferdezeitung.de
>
>
>
Join 18 million Eudora users by signing up for a free Eudora Web-Mail account at
http://www.eudoramail.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php