I've been charged with updating an existing program and I am confused on exactly how a piece of code is being handled by php. Perhaps someone can shed some light for me?
This snippet represents a function and is written as follows:
define("LATEST", 1);
function _get_something($from=LATEST, $limit=10) {
$where = "field_termcode_value >= (%d - %d)";
.
.
.
then this code goes on to generate a sql statement which the above $where variable is used in a WHERE clause.
My question is: What does the field $where look like after execution? In my own trial testing I only get the literal value including the %d characters.
Any responses/pointers greatly appreciated. Thanks
This snippet represents a function and is written as follows:
define("LATEST", 1);
function _get_something($from=LATEST, $limit=10) {
$where = "field_termcode_value >= (%d - %d)";
.
.
.
then this code goes on to generate a sql statement which the above $where variable is used in a WHERE clause.
My question is: What does the field $where look like after execution? In my own trial testing I only get the literal value including the %d characters.
Any responses/pointers greatly appreciated. Thanks