Jump to content

Query Problem


james182

Recommended Posts

i have a problem.

 

$colours =  implode("','", explode('-', substr_replace($colour ,"",-1))); // outputs: D','E','F 

"','"

is getting placed in the query as

"\',\'"

need to change '\'E\',\'F\''

SELECT * FROM (`default_products_diamonds`) WHERE `shape` = 'Princess' AND `colour` IN ('\'D\','\'E\',\'F\'') 

 

Needs to be like this:

SELECT * FROM (`default_products_diamonds`) WHERE `shape` = 'Princess' AND `colour` IN ('D','E','F') 

 

 

Link to comment
https://forums.phpfreaks.com/topic/264653-query-problem/
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.