newbie question on variables in php

From: Date: Tue, 25 Jul 2000 16:58:36 +0000
Subject: newbie question on variables in php
Groups: php.general 
Request: Send a blank email to php-general+get-8088@lists.php.net to get a copy of this message
I'm studying a php/mysql package I downloaded called freemed. I am wondering how a specific variable gets set which is called $db I can't see how it gets set anywhere in the program. I did a grep -a \$db and I got; export.php3: <$STDFONT_B>Exporting Database \"$db\" ... export.php3: if (freemed_export_stock_data ($db)) { echo "$Done."; } freemed-calendar-functions.inc: //$query = "SELECT * FROM " . $dbconfig["schedule_table"] . " WHERE " . sqlDuringDay( $datestr ) . " AND (" . $groupquery . ")"; freemed-functions.inc:function freemed_get_link_rec($id="0", $db="") freemed-functions.inc: if (empty($db)) { freemed-functions.inc: $result=fdb_query("SELECT * FROM $db WHERE freemed-functions.inc:function freemed_get_link_field($id="0", $db="", $field="id") freemed-functions.inc: if (strlen($db)<1) { freemed-functions.inc: $this_array=freemed_get_link_rec($id,$db); import.php3: <$STDFONT_B>Importing Database \"$db\" ... import.php3: if (freemed_import_stock_data ($db)) { echo "$Done."; } I see it gets set as null on some lines with a $db="" My problem is during import.php3 it doesn't get set, but during export.php3 it DOES get set - BUT HOW!!??? I have never seen code that set's it other that $db="" - is there a way of setting $db without a $db="variable-setting" statement?

« previous php.general (#8088) next »