Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SQL Syntax error


Recommended Posts

Posted

Hi,

 

When I clicked on update after previewing a product (new or changed) I got this message:

 

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/a5265701/public_html/catalog/admin/categories.php on line 264

 

Warning: Cannot modify header information - headers already sent by (output started at /home/a5265701/public_html/catalog/admin/categories.php:264) in /home/a5265701/public_html/catalog/admin/includes/functions/general.php on line 22

 

after solving the problem by changing admin/categories line 264

$sql_data_array = array_merge($sql_data_array, $insert_sql_data);

to

$sql_data_array = array_merge(array($sql_data_array), $insert_sql_data);

 

I am getting a different error message at the same point:

 

1064 - 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 '0, products_id) VALUES ('', '215')' at line 1

 

REPLACE INTO products_images (0, products_id) VALUES ('', '215')

 

[TEP STOP]

 

Everytime I refresh or try the same procedure again, the number (right now at 215) increases by one.

Sometimes the product entry gets created eventhough im stuck at the error.

 

My Server is running

osCommerce 2.2 RC2

MySQL 4.1.22-standard

PHP 5.2.5 (Zend: 2.2.0)

 

What can I do?

 

Thanks

Posted

It wont let me edit my previous post anymore but i think i have to say some more things...

 

I installed http://addons.oscommerce.com/info/4170 right before this error started occuring.

When I put only the main picture in, i only get the message described previously. when i put in more pictures (with help of the contrib) i get a different message:

 

Warning: mysql_real_escape_string() expects parameter 1 to be string, array given in /home/a5265701/public_html/catalog/admin/includes/functions/database.php on line 157

Free Web Hosting

 

1064 - 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 '0, products_id) VALUES ('', '220')' at line 1

 

REPLACE INTO products_images (0, products_id) VALUES ('', '220')

 

[TEP STOP]

 

I thought that might help...

Archived

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

×
×
  • Create New...