|
Posted by Bob Bedford on 05/10/07 17:29
"David Gillen" <Belial@RedBrick.DCU.IE> a ιcrit dans le message de news:
slrnf46gpa.4na.Belial@murphy.redbrick.dcu.ie...
> Bob Bedford said:
>> HI all,
>> Weird problem....
>>
>> in the file queries.inc.php I've this:
>> $query = 'select * from list where content = '.$idcontent;
>>
>> I've this code in my page:
>> $idcontent = 15;
>> require_once("queries.inc.php");
>>
>> The query fails: when I do echo the query I've:
>>
>> select * from list where content =
>>
>> The $idcontent isn't set in the include...why ? how to fix it ?
>>
> Is your $query = .. line inside of function in teh queries.inc.php?
> If so $idcontent is out of scope.
NO it's not....
I've also tried to define the idcontent var as global again in the
queries.inc.php but it doesn't work either.
Navigation:
[Reply to this message]
|