Jump to content

can't make this work...


AV1611

Recommended Posts

Guest footballkid4
Av! Haven't seen you around here for a while.

Anyways:
Do you have an auto_inc ID in both tables? If so, you might want to provide a fieldlist, because the way you are doing it:
[!--sql--][div class=\'sqltop\']SQL[/div][div class=\'sqlmain\'][!--sql1--][span style=\'color:blue;font-weight:bold\']INSERT[/span] [color=green]INTO[/color] [color=orange]tblname[/color] VALUES (valuestrung) [!--sql2--][/div][!--sql3--]
SQL assumes that you have a value for every column (including ID)
Link to comment
https://forums.phpfreaks.com/topic/6126-cant-make-this-work/#findComment-22137
Share on other sites

Hey, Football!

I went with this...



[code]
$query0 = mysql_query("
insert into firstpass2
(Select
Min(firstpass.it_date) AS it_date,
firstpass.insptype,
firstpass.`process`,
firstpass.product,
firstpass.descr,
firstpass.rev_level,
firstpass.serialno,
firstpass.failed
From firstpass
Group By firstpass.serialno)") or die('71'.mysql_error());
[/code]
Link to comment
https://forums.phpfreaks.com/topic/6126-cant-make-this-work/#findComment-22333
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.