Error que no Entiendo
Publicado por siREZ (203 intervenciones) el 30/06/2016 18:33:01
me sucede lo siguiente
Estoy trabajando en localhost
me marca el siguiente error:
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 '2016 WHERE titulo = 'C-007-16.txt'' at line 1
el script es:
la Tabla:
la conexion
No veo el error
Alguien lo puede ver?
gracias.
siREZ
Estoy trabajando en localhost
me marca el siguiente error:
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 '2016 WHERE titulo = 'C-007-16.txt'' at line 1
el script es:
1
2
3
4
5
6
7
8
9
10
$arc = htmlspecialchars($_GET["tit"]);
//echo $arc;exit;
require_once('../Connections/myconexion.php');
mysql_select_db($database_myconexion, $myconexion);
$query_Recordset1 = "SELECT texto,titulo FROM 2016 WHERE titulo = '$arc' ";
$Recordset1 = mysql_query($query_Recordset1, $myconexion) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
$linea = $row_Recordset1['texto'];
la Tabla:
1
2
3
4
5
6
CREATE TABLE IF NOT EXISTS `2016` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`titulo` varchar(50) NOT NULL COMMENT 'titulo E43E-2DE9',
`texto` text NOT NULL COMMENT 'texto',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
la conexion
1
2
3
4
5
6
7
8
9
10
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_myconexion = "localhost:3307";
$database_myconexion = "juisp";
$username_myconexion = "root";
$password_myconexion = "usbw";
$myconexion = mysql_pconnect($hostname_myconexion, $username_myconexion, $password_myconexion) or trigger_error(mysql_error(),E_USER_ERROR);
?>
No veo el error
Alguien lo puede ver?
gracias.
siREZ
Valora esta pregunta


0