URGENT Please: global or not?

From: Date: Tue, 19 Dec 2000 17:58:33 +0000
Subject: URGENT Please: global or not?
Groups: php.general 
Request: Send a blank email to php-general+get-31028@lists.php.net to get a copy of this message
Hello, I use a bunch of functions to query the db. I used a table named buildType to store types of buildings for rent AND sales Now the client tells me that buildings are different for RENT from those for SALE so I use buildType for Rent and I created buildTypeA for Sale My functions doesn't work any more since I tried to cope with the problem by assigning a variable $buildTypeTAB the names of the tables that on time to time I need to query function q(){ return "select * from $buildTypeTAB " } BUT the function q returns only: "select * from" and of course gives an error... I declare the $buildTypeTAB variable in the config.inc file at top of every file and as first inclusion of includes... HOW SHOULD I DECLARE THEM in order for them to be "seen" inside the functions? Thanks: Nicola Nicola Delbono key5@key5.com Key5 di Delbono Nicola P.zza Cavour, 22 25038 Rovato (Bs) Tel 39 030 7241055 Fax 39 030 7241055 Cell. 0338 5071740

« previous php.general (#31028) next »