Jump to content

Problem With $Db->Executes And Ps_Prodcut.reference


TheApprentice

Recommended Posts

Hi guys,

 

I'm editing homefeatured module to add a new functionality that makes easiest the addition of featured products. But im having trouble with the native function $db->executeS():

 

I have an array with all products references i want to make featured but when i try to make a SQL like this one:

 

SELECT `id_product` 
FROM `ps_product` 
WHERE `reference` 
IN (

'90YV06I3-M0NA00 ', 'GT740-OC-1GD5 ', '90YV06P1-M0NA00 ', '90YV06P0-M0NA00 ', 'OH/RF0/NO ', 'OH/FE08/NP ', 'VA1917A ','90LM00F0-B02670 ', 'S2V-00018 ', '4460105 ', '2960762 ', '9239437 ', 'MCB43114S001/04/1 ', 'MCP1 ', 'MK1 ', 'MK2 ', 'CH-9000109-EU ','10NXMP0026002 ', '31010009102'

)
LIMIT 0 , 30

 

i only get one result from the query (while on phpmyadmin im having 18 results)... i've tested that query on phpMyAdmin and works fine but not on prestashop... i have suspects that maybe is a problem about slashes but im not sure.

 

Any idea?.

 

Thanks in advance.

 

 

EDIT: Sorry was a problem with EOL characters that broke the sentece. its all ok.

Edited by kirkhelek (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...