Not sure if I should post this to beginners or not but there it goes.
I have 10+ tables with some of the same information in each in table of a mysql
database. Here is an example:
Table 1
namecount
-+---
Widgets-A| 10
Widgets-B| 5
Widgets-C| 10
--As of Monday, April 26, 2004 5:30 PM -0700, Christopher Lyon is alleged
to have said:
So, how to I get the values to look like in variable so that I can push
them back into a new table:
New Table
namecount
-+---
Widgets-A| 25
Widgets-B| 10
Widgets-C| 20
On 4/26/2004 11:53 PM, Daniel Staal wrote:
--As of Monday, April 26, 2004 5:30 PM -0700, Christopher Lyon is
alleged to have said:
So, how to I get the values to look like in variable so that I can push
them back into a new table:
New Table
namecount
-+---
Widgets-A|25
In my script, I do the following: I insert x amount of records into a MySQL
table, process the information and then delete those records. One of the
columns is an autonumber type so it starts at 1 for instance. In my query
string I use placeholders. Now sometimes the field which is an autonumber
From the MySQL docs:
If you delete the row containing the maximum value for an AUTO_INCREMENT column, the
value will be reused with an ISAM, or BDB table but not with a MyISAM or InnoDB table.
If you delete all rows in the table with DELETE FROM table_name (without a WHERE) in
AUTOCOMMIT mode,