Hi
i'm running php4.2.3 with apache 2* on win2K pro
when running the following i can't seem to get anything to echo in a while loop in a class method or anything from a mySql db.
when i do a count() on the query it returns "1" so it is finding the db and getting the info
am i blind and can't see a mistake in the code or is there somthing else i'm missing :rolleyes:
thanks for the help in advance...heres the code
<?
class ebiz_card extends db_link{
var $run_query;
var $result;
var $busName;
function get_card_nfo($user_id = 1){
$this->query = "select * from users where 'id' = '$user_id'";
$this->run_query = mysql_query($this->query, $this->link);
}
function show_card(){
while($this->result = mysql_fetch_row($this->run_query)){
$this->busName = $this->result["busName"];
echo "$this->busName"; // does not work
echo "hello 1"; // does not work
}
echo "$this->busName";// does not work
echo "hello 2"; // this works
}
}
//------------------------------------------------------------
$card = new get_card_nfo();
$card->show_card();
😕