Jump to content

[SOLVED] db error: syntax error AAAAARG


Lodius2000

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.