Reputation: 4958
I have this simple string variable:
$query="SELECT * FROM striscie AS previous, striscie AS current WHERE previous.linea=current.linea AND current.ident=$striscia AND previous.position<current.position AND previous.position>current.position-$stops";
yet, when I echo or use it, it turns to:
SELECT * FROM striscie AS previous, striscie AS current
WHERE previous.linea=current.linea AND current.ident=897524 AND previous.positioncurrent.position-3
SELECT * FROM striscie AS previous, striscie AS current
WHERE previous.linea=current.linea AND current.ident=920173 AND previous.positioncurrent.position-2
By deleting the whole part of the string. I tried restarting Apache to no avail. What might it be?
Upvotes: 0
Views: 67
Reputation: 324800
<
is being treated as HTML by the browser. Don't blindly output stuff like that.
Upvotes: 8