Jump to content

[SOLVED] SQL Query Question


kyleldi

Recommended Posts

Hi All,

 

I'm doing something quite simple here, but for some reason I can't get it to work.  My sql query (in php) needs to select data based on two requirements. 

 

$query_rs_store = sprintf("SELECT * FROM store WHERE category = "%s" AND active = "Yes" ORDER BY id ASC", GetSQLValueString($colname_rs_store, "text"));

 

The problem is I keep getting this Parse Error:  Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in ere.php

 

I've tried using ' instead of " for the specific categories, but it still doesn't work.  %s is a url variable, while active is not.  Does this make a difference?

Link to comment
https://forums.phpfreaks.com/topic/108355-solved-sql-query-question/
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.