I have problems with WPDB Syntaxis

I have problems with this code, it appears the syntaxis is wrong but i don't know where is the mistake:



Have you tried the query like this? values(%s,%s,%s...) without using the quotes? ie: from this: '%s', to %s,%s....

also try setting your table name before including it within the main query

$table_consultte = $wpdb->prefix."consultte"; //(I assume the prefix is 'wp_')

you could also try something like this:

$sql = "INSERT INTO ".$table_consultte." (Imagen,Paterno,Materno,Nombre,Lugar,Fecha,Genero,EstadoCivil,Domicilio,Colonia,Postal,Ciudad,TelCasa,Movil,Nextel,NextelKey,Email,Email2,Email3,Otro,Facebook,Twitter,Blackberry,Linkedin,Carrera,Universidad,Titulo,Egreso,UniLugar,Maximo,OtrosCursos,Idioma1,Hablado1,Escrito1,Idioma2,Hablado2,Escrito2,Idioma3,Hablado3,Escrito3,TipoE1,NombreE1,DomE1,SectorE1,JefeE1,TelE1,RespE1,ActE1,TipoE1,NombreE2,DomE2,SectorE2,JefeE2,TelE2,RespE2,ActE2,NombreE3,DomE3,SectorE3,JefeE3,TelE3,RespE3,ActE3,OPC,OPD,OSP,Comisiones,Regulaciones,Programas,Regimenes,Ordenamiento,Negociadores) VALUES (%s, %s, %s, %s - add the rest! )";

$wpdb->query( $wpdb->prepare( $strQuery, $destino,$paterno,$materno,$nombre,$estado,$datepicker,$genero,$civil,$domicilio,$colonia,$cp,$ciudad,$telefono,$movil,$nextel,$nextelkey,$email,$email2,$email3,$skype,$facebook,$twitter,$blackberry,$linkedin,$carrera,$universidad,$titulo,$egreso,$uniestado,$maximo,$seminarios,$idioma,$hablado,$escrito,$idioma2,$hablado2,$escrito2,$idioma3,$hablado3,$escrito3,$tipos,$empresa,$domempresa,$secempresa,$jefe,$contactos,$resposabilidades,$actividades,$tipos,$empresa2,$domempresa2,$secempresa2,$jefe2,$contactos2,$resposabilidades2,$actividades2,$empresa3,$domempresa3,$secempresa3,$jefe3,$contactos3,$resposabilidades3,$actividades3,$opc,$opd,$osp,$com,$rra,$pfe,$rea,$ole,$nin,$log));

then use:

<?php $wpdb->show_errors(); ?> 

to see if it produces any errors..


Similar questions

$wpdb->insert : problems adding multiple records ( nearly 1000)
I need to add nearly 1000 records from my plugin. While trying sometimes I have not all records are added. Also the number of records varies. Sometimes it is 300 , sometimes it is 400 , sometimes it is 200 etc. Initial query was: I though some problems maybe with $value. Then to test I tried with the following: It is also behaving the same. Sometim...
Wordpress multi-user, custom database, potential concurrency problems when using global wpdb
I am developing a Wordpress site, which will handle user registration, friends, teams and soccer tournament brackets. On this site I have the wordpress core database and a few custom non-wordpress tables, that I have made myself. I would like to use the Wordpress global $wpdb variable to make CRUD requests on my custom tables. Question: Will I run ...
I have two problems ( SEO )
how are you ? In my website I want to make the author's page and category(slug of it is country) to be in google reslut .. like this : http://rehlat-world.com/profile/saqaf , but when I search in google : site:rehlat-world.com , I didn't find authors page. how can include authors page in google result , this is my robort and this is my sitemap note...
If I use Apache & ngnix together will I have fewer problems?
I have a VPS set-up and because it had limited RAM I set it up to run nginx instead of apache. But although performance has been reasonable, I've had problems with things like multi-site rules and plugins complaining. I was wondering if I used Apache and Nginx together, with nginx serving static files, apache php would I get both performance and co...
Do I have to face security problems if I changing default role to Contributor
I am building a community site like medium.com. Instead of creating front-end form, I am going to change default role as Contributor or allow subscriber role to insert posts/ CPT.... I need to know that, do I have to face security problems?
I have problems with loading javascripts
Fitclaw I have problem with loading my css/js files. They're uploaded on ftp but i had to direct them with the whole path including domain because with ../ it didn't worked. That's for CSS. JS doesn't works i don't know why i please you to see the page source and i will upload here the functions.php from the bootstrap theme. This is functions.php a...

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy.