Foros del Web » Creando para Internet » Sistemas de gestión de contenidos »

#1064 - You have an error in your SQL syntax check the manual that corresponds ....

Estas en el tema de #1064 - You have an error in your SQL syntax check the manual that corresponds .... en el foro de Sistemas de gestión de contenidos en Foros del Web. tengo un foro echo con vbulletin 3.7.3, lo acabo de cambiar de hosting y me sale este error al generar un consulta SQL Consulta Código ...
  #1 (permalink)  
Antiguo 08/10/2008, 20:00
 
Fecha de Ingreso: agosto-2008
Mensajes: 9
Antigüedad: 15 años, 8 meses
Puntos: 0
#1064 - You have an error in your SQL syntax check the manual that corresponds ....

tengo un foro echo con vbulletin 3.7.3, lo acabo de cambiar de hosting y me sale este error al generar un consulta SQL

Consulta

Código PHP:
INSERT INTO datastore VALUES('pluginlist'a:88:{s:21:"postbit_display_start\";s:1202:\"if (version_compare($vbulletin->options[\'templateversion\'], \'3.6.7\', \'>=\') && version_compare($vbulletin->options[\'templateversion\'], \'3.6.8\', \'<\'))\r\n{\r\n    $template_hook[postbit_userinfo_right] = \'\';\r\n    $template_hook[postbit_controls] = \'\';\r\n    $template_hook[postbit_end] = \'\';\r\n}\r\nrequire_once(DIR . \'/includes/functions_post_thanks.php\');\r\n\r\nif (!(defined(\'LOCATION_BYPASS\')) && !(post_thanks_off($this->thread[\'forumid\'], $this->post, $this->thread[\'firstpostid\'], THIS_SCRIPT)))\r\n{\r\n    global $ids;\r\n\r\n    $thanks = fetch_thanks($this->post[\'postid\'], $ids);\r\n\r\n    if (thanked_already($this->post) && $this->registry->options[post_thanks_delete_own])\r\n    {\r\n        $this->post[\'show_thanks_remove_option\'] = true;\r\n    }\r\n\r\n    if ($this->post[\'post_thanks_amount\'] > 0 && $this->thread[\'isdeleted\'] == 0)\r\n    {\r\n        $this->post[\'post_thanks_bit\'] = fetch_thanks_bit($this->thread[\'forumid\'], $thanks);\r\n        $this->post[\'post_thanks_user\'] = $post_thanks_user;\r\n        $this->post[\'post_thanks_amount_formatted\'] = vb_number_format($this->post[\'post_thanks_amount\']);\r\n\r\n        $post_thanks_box = fetch_post_thanks_template($this->post);\r\n    }\r\n\r\n    eval(\'$template_hook[postbit_end] .= \" \' . fetch_template(\'post_thanks_box\') . \'\";\');\r\n}\r\n\";s:16:\"showthread_start\";s:815:\"//*\r\n    $ara = \'<!-- message -->\'; \r\n$vbulletin->templatecache[\'postbit_legacy\'] = str_replace($ara,$ara.fetch_template(\'postbit_post_in_post_title\'),$vbulletin->templatecache[\'postbit_legacy\']);\r\nif ($vbulletin->options[\'hlfg_global\'])\r\n{\r\n    $groups = explode(\',\',$vbulletin->options[\'hlfg_groups\']);\r\n    if ($vbulletin->options[\'hlfg_quotes\'] AND !$vbulletin->userinfo[\'userid\'] OR $vbulletin->options[\'hlfg_quotes\'] AND (is_member_of($vbulletin->userinfo, $groups) OR $groups[0] == 0))\r\n    {\r\n        if (!$foruminfo[\'forum_hlfg\'])\r\n        {\r\n            $vbulletin->options[\'multiquote\'] = false;\r\n            $vbulletin->options[\'quickreply\'] = false;\r\n        }\r\n    }\r\n}\r\n//*\r\n    $ara = \'<!-- message -->\'; \r\n$vbulletin->templatecache[\'postbit\'] = str_replace($ara,$ara.fetch_template(\'postbit_post_in_post_title\'),$vbulletin->templatecache[\'postbit\']);\r\n\";s:13:\"profile_start\";s:1155:\"if ($_REQUEST[\'do\'] == \'dismissednotices\') \r\n{ \r\n  $globaltemplates = array(\'modifydismissednotices\', \'modifydismissednotices_bit\'); \r\n  cache_templates($globaltemplates, $style[\'templatelist\']); \r\n  // draw cp nav bar \r\n  construct_usercp_nav(\'dismissednotices\'); \r\n    \r\n  $dismissed_notices = \'\';\r\n\r\n  if( $vbulletin->userinfo[\'dismissed_p_notices\'] != \"\" )\r\n  {\r\n    $dismissed_p_notices = explode( \',\', $vbulletin->userinfo[\'dismissed_p_notices\'] );\r\n    $dismissed_notices_count = 1;\r\n\r\n    foreach( $dismissed_p_notices AS $_noticeid )\r\n    {\r\n      if( !$vbulletin->noticecache[$_noticeid ] ) continue;\r\n      $notice_html = str_replace(array(\'{musername}\', \'{username}\', \'{userid}\', \'{sessionurl}\'), array($vbulletin->userinfo[\'musername\'], $vbulletin->userinfo[\'username\'], $vbulletin->userinfo[\'userid\'], $vbulletin->session->vars[\'sessionurl\']), $vbphrase[\"notice_{$_noticeid}_html\"]);\r\n\r\n      eval(\'$dismissed_notices .= \"\' . fetch_template(\'modifydismissednotices_bit\') . \'\";\');\r\n\r\n      $dismissed_notices_count++;\r\n    }\r\n  }\r\n \r\n  $navbits[\'\'] = $vbphrase[\'editing_dismissed_notices\']; \r\n  $templatename = \'modifydismissednotices\'; \r\n}\r\n\";s:22:\"notices_check_criteria\";s:79:\"if( $criteriaid == \'dismissed\' AND $conditions == 1 )\r\n{\r\n  $abort = true;\r\n}\r\n\";s:19:\"notices_check_start\";s:395:\"if( $vbulletin->userinfo[\'userid\'] > 0 )\r\n{\r\n  $dismissed_p_notices = explode( \',\', $vbulletin->userinfo[\'dismissed_p_notices\'] );\r\n\r\n  foreach( $dismissed_p_notices AS $noticeid )\r\n  {\r\n    if( isset( $vbulletin->noticecache[$noticeid] ) )\r\n    {\r\n      $vbulletin->noticecache[$noticeid] = array_merge( (array) $vbulletin->noticecache[$noticeid], array( \'dismissed\' => \'1\') );\r\n    }\r\n  }\r\n}\r\n\";s:17:\"notices_noticebit\";s:417:\"if( $vbulletin->noticecache[$_noticeid][\'persistent\'] == 1 AND $vbulletin->userinfo[\'userid\'] > 0 AND ($permissions[\'skdismissnoticespermissions\'] & $vbulletin->bf_ugp[\'skdismissnoticespermissions\'][\'candismissnotices\']) )\r\n  $show[\'dismiss_notice\'] = true;\r\nelse\r\n  $show[\'dismiss_notice\'] = false;\r\n\r\neval(\'$notice_html = \"\' . fetch_template(\'navbar_noticebit_dismiss\') . \'\";\');\r\n$show[\'dismiss_separate\'] = true;\r\n\";s:15:\"cache_templates\";s:3825:\"$globaltemplates = array_merge($globaltemplates, array(\'navbar_noticebit_dismiss\'));\r\n// TrucLinh @ VietOnLine | vB-Viet.Org\r\n                if (THIS_SCRIPT == \'showthread\' AND $vbulletin->options[\'quickreply\'] > 0)\r\n            {\r\n                $globaltemplates = array_merge($globaltemplates, array(\r\n                \'newpost_disablesmiliesoption\',\r\n                \'editor_smiliebox_straggler\',\r\n                \'editor_smiliebox_row\',\r\n                \'smilies_quickreply\',\r\n                \'editor_smiliebox\',\r\n                \'editor_smilie\',\r\n                ));\r\n            }\r\n\r\n        if ($vbulletin->options[\'cybtopstats_enable_global\'])\r\n        {\r\n            $globaltemplates = array_merge($globaltemplates, array(\'cyb_topstats_stats\', \'cyb_topstats_latestnews\', \'cyb_topstats_member\', \'cyb_topstats_poster\', \'cyb_topstats_starter\', \'cyb_topstats_referrer\', \'cyb_topstats_mostviewed\', \'cyb_topstats_hottest\', \'cyb_topstats_reputation\', \'cyb_topstats_thanks\', \'cyb_topstats_topforums\', \'cyb_topstats_newposts\', \'cyb_topstats_infractions\', \'cyb_topstats_classads\', \'cyb_topstats_blogs\', \'cyb_topstats_turnon\', \'cyb_topstats_php\'));\r\n        }\r\n\r\n        if ($vbulletin->options[\'cyb_vmood_enable\'])\r\n        {\r\n            $globaltemplates = array_merge($globaltemplates, array(\'cyb_vmood\'));\r\n        }\r\n$globaltemplates = array_merge($globaltemplates, array(\r\n    \'post_thanks_navbar_search\',\r\n    \'post_thanks_postbit_info\'\r\n));\r\n\r\nif (THIS_SCRIPT === member)\r\n{\r\n    $globaltemplates = array_merge($globaltemplates, array(\r\n        \'post_thanks_memberinfo_block\',\r\n        \'post_thanks_memberinfo_css\',\r\n        \'post_thanks_member_info\'\r\n    ));\r\n}\r\n\r\nif (THIS_SCRIPT === showthread || THIS_SCRIPT === showpost || THIS_SCRIPT === post_thanks)\r\n{\r\n    $globaltemplates = array_merge($globaltemplates, array(\r\n        \'post_thanks_box\',\r\n        \'post_thanks_box_bit\',\r\n        \'post_thanks_button\',\r\n        \'post_thanks_javascript\',\r\n        \'post_thanks_postbit\',\r\n        \'post_thanks_postbit_legacy\'\r\n    ));\r\n}\r\n$globaltemplates[] = \'top_statistics_navbar\';\r\nif(THIS_SCRIPT == \'misc\')\r\n{\r\n$globaltemplates[] = \'top_statistics_main\';\r\n$globaltemplates[] = \'top_statistics_nav1\';\r\n$globaltemplates[] = \'top_statistics_statistic1\';\r\n$globaltemplates[] = \'top_statistics_statistic2\';\r\n$globaltemplates[] = \'top_statistics_maxforumxs\';\r\n$globaltemplates[] = \'top_statistics_maxthread\';\r\n$globaltemplates[] = \'top_statistics_maxviewxs\';\r\n$globaltemplates[] = \'top_statistics_topposters\';\r\n$globaltemplates[] = \'top_statistics_close\';\r\n}\r\n$globaltemplates = array_merge($globaltemplates, array(\'navbar2\'));\r\nif(THIS_SCRIPT == \'index\')\r\n{\r\n$globaltemplates = array_merge($globaltemplates, array(\'ARCADE\'));\r\n}\r\nif(defined(\'VBSEO_ENABLED\'))\r\nvbseo_complete_sec(\'cache_templates\');\r\n$globaltemplates[] = \'gaip_code1\';\r\n$globaltemplates = array_merge($globaltemplates, array(\'vbookie_resultbits\', \'vbookie_outcomebits\', \'vbookie_outcomebits_nobet\', \'vbookie_eventresults_table\',\'vbookie_event_table\'));\r\n\r\nif ($vbulletin->options[\'wvt\'] AND ($vbulletin->options[\'wvtall\'] OR THIS_SCRIPT == \'index\'))\r\n{\r\n    if ($vbulletin->options[\'wvtgrpz\'])\r\n    {\r\n        $show[\'wvt\'] = false;\r\n        $groups = explode(\',\',$vbulletin->options[\'wvtgrps\']); \r\n        if ($vbulletin->options[\'wvtgrpz\'] == 1)\r\n        {\r\n            if (is_member_of($vbulletin->userinfo,$groups)) \r\n            {\r\n                $show[\'wvt\'] = true;\r\n            }\r\n        }\r\n        if ($vbulletin->options[\'wvtgrpz\'] == 2)\r\n        {\r\n            if (!is_member_of($vbulletin->userinfo,$groups)) \r\n            {\r\n                $show[\'wvt\']= true;\r\n            }\r\n        }\r\n    }\r\n    else\r\n    {\r\n        $show[\'wvt\']= true;\r\n    }\r\n}\r\nelse\r\n{\r\n    $show[\'wvt\']= false;\r\n}\r\n\r\nif ($show[\'wvt\']) \r\n{\r\n    $globaltemplates[] = \'Display_Visitors\' ;\r\n    $globaltemplates[] = \'Display_Visitors_User\' ;\r\n}\r\n\r\n\r\n        if ($vbulletin->options[\'cybsfa_enable\'] AND (THIS_SCRIPT==\'index\' OR THIS_SCRIPT==\'forumdisplay\'))\r\n        {\r\n            $globaltemplates = array_merge($globaltemplates, array(\'cyb_subforummanager\'));\r\n        }\r\nif (THIS_SCRIPT === showthread){\r\n                $globaltemplates  = array_merge($globaltemplates, array(\'sid_hide_head\', \'sid_hide_noaccess\'));\r\n            }\r\n\";s:16:\"usercp_nav_start\";s:32:\"$cells[] = \'dismissednotices\';\r\n\";s:19:\"archive_thread_post\";s:1400:\"if ($vbulletin->options[\'hlfg_global\'])\r\n{\r\n    $groups = explode(\',\',$vbulletin->options[\'hlfg_groups\']);\r\n    if ($vbulletin->options[\'hlfg_archive\'] AND !$vbulletin->userinfo[\'userid\'] OR $vbulletin->options[\'hlfg_archive\'] AND (is_member_of($vbulletin->userinfo, $groups) OR $groups[0] == 0))\r\n    {\r\n        if (!$foruminfo[\'forum_hlfg 
es mas largo pero lo tube que cortar -.-


Respuesta

Parece haber un error en su consulta de SQL. La salida generada por el servidor de MySQL, de existir, aparece abajo, en cuyo caso puede ayudar a diagnosticar el problema.

ERROR: Comillas sin cerrar @ 43
STR: '


que hago? =(
  #2 (permalink)  
Antiguo 08/10/2008, 20:11
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: #1064 - You have an error in your SQL syntax check the manual that corresp

si son las comillas... tampoco las abres !!

suerte...
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #3 (permalink)  
Antiguo 08/10/2008, 20:16
 
Fecha de Ingreso: agosto-2008
Mensajes: 9
Antigüedad: 15 años, 8 meses
Puntos: 0
Respuesta: #1064 - You have an error in your SQL syntax check the manual that corresp

y como hago? :s no tengo ni idea de eso,,


alguien sabe como quedaria? Xd
  #4 (permalink)  
Antiguo 08/10/2008, 20:21
okram
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: #1064 - You have an error in your SQL syntax check the manual that corresp

Todos los valores dentro de VALUES deben ir entrecomillados:

Código php:
Ver original
  1. $sql = "INSERT INTO tabla (campo1, campo2) VALUES ('valor1', 'valor2')";

Dees poner entre comillas (simples) esto: a:88:{s:21:"postbit_dis...

  #5 (permalink)  
Antiguo 08/10/2008, 20:35
 
Fecha de Ingreso: agosto-2008
Mensajes: 9
Antigüedad: 15 años, 8 meses
Puntos: 0
Respuesta: #1064 - You have an error in your SQL syntax check the manual that corresp

no os entiendo :S


aqui les dejo el codigo entero, a ver si me pueden aydar
http://wrestling-elite.org/vbulletinphp.txt

gracuas :B
  #6 (permalink)  
Antiguo 08/10/2008, 20:44
okram
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: #1064 - You have an error in your SQL syntax check the manual that corresp

Todo eso es tu consulta?

Pon por favor sólo tu consulta. Nadie se tomará el tiempo de examinar todo ese código en busca de la dichosa query. Si todo eso es la consulta, pues revisa que todas las comillas imples en cada valor estén escapadas (\'), y sólo las que delimitan el valor deben estar solas.

Saludos,
  #7 (permalink)  
Antiguo 08/10/2008, 20:46
 
Fecha de Ingreso: agosto-2008
Mensajes: 9
Antigüedad: 15 años, 8 meses
Puntos: 0
Respuesta: #1064 - You have an error in your SQL syntax check the manual that corresp

realmente estoy restaurando la base de datos de mi foro...xD pero en esa parte me tira error -.-


entonces todas las comillas deben estar asi "" \' ""


??


gracias :B
  #8 (permalink)  
Antiguo 08/10/2008, 20:55
okram
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: #1064 - You have an error in your SQL syntax check the manual that corresp



Si la consulta entera la delimitas con comillas dobles ("), pues debes escapar todas las comillas dobles que formen parte de esa consulta (\"). Si los valores que quieres insertar a tu BD están delimitados con comillas simples ('), pues todas las comillas simples que estén dentro de algún valor a insertar deben ser escapadas (\').

http://www.forosdelweb.com/como-usar...s-bien-588701/

Saludos,
  #9 (permalink)  
Antiguo 08/10/2008, 21:19
Avatar de pateketrueke
Modernizr
 
Fecha de Ingreso: abril-2008
Ubicación: Mexihco-Tenochtitlan
Mensajes: 26.399
Antigüedad: 16 años
Puntos: 2534
Respuesta: #1064 - You have an error in your SQL syntax check the manual that corresp

Código PHP:
$sql "INSERT INTO tabla (varchar1, text2, float3, int4) VALUES ('valor1', '{foo:bar[3,2,1]}', 0.2, 99)"
solo usa las comillas si ya viene escapado el texto, y solo... sin es texto
(si son números y el campo es INT debe ir sin ellas)

suerte!
__________________
Y U NO RTFM? щ(ºдºщ)

No atiendo por MP nada que no sea personal.
  #10 (permalink)  
Antiguo 08/10/2008, 22:21
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: #1064 - You have an error in your SQL syntax check the manual that corresp

Tema trasladado a Aplicaciones Prefabricadas.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 14:05.