
Error en MySQL: You have an error in your SQL syntax
Publicado por german (21 intervenciones) el 03/02/2017 21:51:05
buen dia me podria ayudar a corregir este error.
Error en MySQL: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'and grupo=' at line 1
adjunto el codigo.
Error en MySQL: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'and grupo=' at line 1
adjunto el codigo.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
session_start();
if($_SESSION['autorizado']<>1){
header("Location: index.php");
}
error_reporting(0);
require('class_lib/class_conecta_mysql.php');
require('class_lib/funciones.php');
$db=new ConexionMySQL();
$linea=test_input($_POST['linea']);
$grupo=test_input($_POST['grupo']);
$descripcion=test_input(strtoupper($_POST['descripcion']));
$cadena="Update lineas set descripcion='$descripcion' where linea=$linea and grupo=$grupo";
$db->consulta($cadena);
?>
Valora esta pregunta


0