could it be a register globals issue? http://www.php.net/register_globals
Are you getting that for from another webpage via POST or GET? if so just try this just before the query: $prodvar = $_GET["prodvar"]; or $prodvar = $_POST["prodvar"]; On 3/11/07, dalemed <[EMAIL PROTECTED]> wrote: > > I would try two things: > > echo $prodvar; // to verify you are really setting it > > Seperate $prodvar like this: > > "SELECT * > FROM productions > WHERE showno = " . $prodvar . " > ORDER BY yearopen"; > > Dale > > --- In [email protected] <php_mysql%40yahoogroups.com>, "Jer" > <[EMAIL PROTECTED]> wrote: > > > > I switched web hosts and I'm trying to get everything up and going. > But, the queries that had > > worked before, don't work anymore. > > > > If there is a variable passed, it doesn't work: > > > > "SELECT * > > FROM productions > > WHERE showno = $prodvar > > ORDER BY yearopen"; > > > > If I put the variable that $prodvar is set to in the query instead > of $prodvar, it works fine. So, > > why is this wrong on a different server? > > > > Thanks for the help. > > > > Jer > > > > > [Non-text portions of this message have been removed]
