Jump to content

Recommended Posts

ok guys, I need some fresh eyes

 

by commenting out 1 query at a time, I have found out that the first query below is the one with the problem, I have also included the second one because it has the same structure and works like a charm,

I have also print_r-ed all the variables in the first query, they are correct

please help me find what is wrong here

 

doesnt work:

$db->query('INSERT INTO entries (article_id, timestamp, article_title, article, order, username, email) VALUES(?,?,?,?,?,?,?)', array($article_id, $timestamp, $title, $article, $new_order, $real_name, $email));

 

works:

$db->query('INSERT INTO image (id, article_id, image_url, thumb_url, image_caption) VALUES(?,?,?,?,?)', array($image_id, $article_id, $image_url, $thumb_url, $caption));

 

i use peardb, which supports place-holders, hence all the ?,?,?,?,?,?,?,?

 

thank you

Link to comment
https://forums.phpfreaks.com/topic/129161-solved-db-error-syntax-error-aaaaarg/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.