You have an error in your SQL syntax
ROTINA:
//Update table
// SQL statement parameters
$update_table = “projectos”; // Table name
$update_where = “numero = [xnumero_projecto]”; // Where clause
$update_fields = array( // Field list, add as many as needed
“valor_orcamentado = $xvalor_orcamentado”,
“despesas = $wtotal_despesas”,
“honorarios = $wtotal_honorarios”,
“recursos_humanos = $wtotal_rh”,
“total = $wtotal”,
“especialidades = $xvalor_especialidades”,
);
// Update record
$update_sql = ‘UPDATE ’ . $update_table
. ’ SET ’ . implode(’, ', $update_fields)
. ’ WHERE ’ . $update_where;
sc_exec_sql($update_sql);
ERRO: por mais que analse não estou a perceber onde está o erro. Como se costuma dizer melhor que 1 par de olhos, vários pares de olhos:
1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE numero = 6’ at line 1
ADOConnection._Execute(UPDATE projectos SET valor_orcamentado = 244.00, despesas = 8.61, honorarios = 1845.00, recursos_humanos = 500.20, total = 2353…, false) % line 1095, file: adodb.inc.php
ADOConnection.Execute(UPDATE projectos SET valor_orcamentado = 244.00, despesas = 8.61, honorarios = 1845.00, recursos_humanos = 500.20, total = 2353…) % line 2722, file: grid_projectos_grid.class.php
grid_projectos_grid.grid() % line 141, file: grid_projectos_grid.class.php
grid_projectos_grid.monta_grid(0) % line 2336, file: index.php
grid_projectos_apl.controle() % line 3903, file: index.php
ERRO
Erro ao aceder a base de dados
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘WHERE numero = 6’ at line 1
UPDATE projectos SET valor_orcamentado = 244.00, despesas = 8.61, honorarios = 1845.00, recursos_humanos = 500.20, total = 2353.81, especialidades = WHERE numero = 6
Script: F:\scv9\Apache24\htdocs\scriptcase\app\wSAGEP\grid_projectos\grid_projectos_grid.class.php (2725)