RE: [PHP] Coding Blues - Parse Error
| From: | Dan Joseph | Date: | Thu, 16 Sep 2004 03:20:59 +0000 |
| Subject: | RE: [PHP] Coding Blues - Parse Error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-196813@lists.php.net to get a copy of this message | ||
Hi,
You don't have a ; at the end of the line. You have $this->db =
$db and you should have $db;.
-Dan Joseph
-----Original Message-----
From: Yusuf [mailto:yusufs@wanadoo.mu]
Sent: Wednesday, September 15, 2004 11:19 PM
To: php-general@lists.php.net
Subject: [PHP] Coding Blues - Parse Error
Hello. I am writing some code, but though everything seems ok, I get the
same error:
"parse error, unexpected T_VARIABLE on line 23" .
Here is the code:
<?
Class fl_SQL
{
var $server;
var $user;
var $pass;
var $connection;
var $db;
var $query;
var $record;
var $tlist;
}
Function fl_SQL($server, $user, $pass, $db = NULL) {
$this->server = $server;
$this->user = $user;
$this->pass = $pass;
$this->db = $db;
}
Function doconnect($db = $this->db){
$this->db = $db
$this->connection = mysql_connect($this->server, $this->user,
$this->pass);
if (!$this->connect) die ("Could not connect to server!");
mysql_select_db($this->db,$this->connection) or die ("Could not
connect to database!");
}
Function doquery($query, $db = $this->db){
$this->db = $db
$this->connect($this->db);
$this->query = $query
mysql_query($this->query,$this->connect)
}
}
?>
Can anyone please help me?
Thanking you in anticipation,
Yusuf
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php