|
How are you going to run PHP inside a SQL query????
SQL servers don't "do" PHP.
You have to build the query then send it, if you need a loop in a query it will have to be coded in a stored procedure (MySQL 5+) and call that.
in your code you have a few problems
$e is declared as a string, incrementing a string is not going to have the effect you would expect.
You have no space in your concatenated code so it would end up as
... WHERE column='0' andcolumn='1' andcolumn='5' andcolumn='3' andcolumn='4' andcolumn='5' and id>'0'
Which as you can tell would raise an error
not 100% sure what you are trying to achieve,
but it seems to me that;
select fieldlist from table WHERE column <= 5 and id = 0 ;
would do exactly what the code above is attempting
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|