This topic is locked

INSERT INTO

1/8/2009 12:59:28 PM
PHPRunner General questions
A
Aleix author

Hello;
I tray save the new data in another table, but It dosen´t work. I am all day doing test but it is imposible! Can you help me please?
I use PHPRunner 5.0 build 766

The code is in

[indent]demo.asprunner.net/info_w4b_info/wwwLocalClear/_tablab_edit.php[/indent'>http://demo.asprunner.net/info_w4b_info/wwwLocalClear/_tablab_edit.php[/indent]

When I do

Tab Tablab ---> Edit any register (not on line) --> Change any valor in any field --> save -- Then it is the error:
PHP error happened

Technical information

Error type 256

Error description Unknown column 'Audi' in 'field list'

URL demo.asprunner.net/info_w4b_info/wwwLocalClear/_tablab_edit.php?

Error file C:\UserAccounts\www\info_w4b_info\wwwLocalClear_20090108093606\include\dbconnection.php

Error line 34

SQL query INSERT INTO _tablaacopia (A2C, A3C) VALUES (Audi,BMW)
There is this code event

//[indent]** Save new data in another table ****

global $conn,$strTableName;
$strSQLSave = "INSERT INTO _tablaacopia (A2C, A3C) VALUES (";
$strSQLSave .= $values["B2"].",";

$strSQLSave .= $values["B3"];
$strSQLSave .= ")";

echo ($strSQLSave);

db_exec($strSQLSave,$conn);
return true;
// return true if you like to proceed with editing this record

// return false otherwise [/indent]
Please some idea, I am a bit lost!
Thanks in advance
Aleix

A
Aleix author 1/8/2009

Hello;

I tray save the new data in another table, but It dosen´t work. I am all day doing test but it is imposible! Can you help me please?
I use PHPRunner 5.0 build 766

The code is in

[indent]demo.asprunner.net/info_w4b_info/wwwLocalClear/_tablab_edit.php[/indent'>http://demo.asprunner.net/info_w4b_info/wwwLocalClear/_tablab_edit.php[/indent]

When I do

Tab Tablab ---> Edit any register (not on line) --> Change any valor in any field --> save -- Then it is the error:
PHP error happened

Technical information

Error type 256

Error description Unknown column 'Audi' in 'field list'

URL demo.asprunner.net/info_w4b_info/wwwLocalClear/_tablab_edit.php?

Error file C:\UserAccounts\www\info_w4b_info\wwwLocalClear_20090108093606\include\dbconnection.php

Error line 34

SQL query INSERT INTO _tablaacopia (A2C, A3C) VALUES (Audi,BMW)
There is this code event

//[indent]** Save new data in another table ****

global $conn,$strTableName;
$strSQLSave = "INSERT INTO _tablaacopia (A2C, A3C) VALUES (";
$strSQLSave .= $values["B2"].",";

$strSQLSave .= $values["B3"];
$strSQLSave .= ")";

echo ($strSQLSave);

db_exec($strSQLSave,$conn);
return true;
// return true if you like to proceed with editing this record

// return false otherwise [/indent]
Please some idea, I am a bit lost!
Thanks in advance
Aleix


Hello!
We found it the problem
The problem is that the code that insert automatically the event, no have double comillas. Then de values are see like fields!
Bye