Hello,
In an attempt to find a workaround for the lack of subquery in MySql, I'm trying use PHP code to limit my result set. I'm trying to use a variable to substitute into a portion of an 'if' statement that I evaluate later in the program. It's not working and I'm not sure how to fix it.
Here is how I'm defining the variable:
$if_statement = '$myrow["Numbers"]>0';
the variable $if_statement will change based on certain criteria. Later in theh program, I then go on to create my 'if' statement as I read through the rows of the table:
if ($if_statement)
{
.....
{
Problem is, the $if_statement variable doesn't seem to translate into a viable statement. I read about the eval() function, which evaluates a string as PHP code, but can't get this to work either. Is this what I need to use to solve my problem? Or, is there a better way to do it?
Thanks!
Mar