Hey guts check out this script ?? :
[CODE]<?php
ini_set(“display_errors”,”1″);
ERROR_REPORTING(E_ALL);
include_once(‘universal_connect.php’);
class CreateTable
{
private $tableMaster;
private $hookup;
private $sql;
public function __construct()
{
$this->tableMaster=”gautam”;
$this->hookup=UniversalConnect::doConnect();
$drop = “DROP TABLE IF EXISTS $this->tableMaster”;
[COLOR=”#FF0000″]if($this->hookup->query($drop) === true)[/COLOR]
{
printf(“Old table %s has been dropped.<br/>”,$this->tableMaster);
}
$this->sql = “CREATE TABLE $this->tableMaster (
id SERIAL,
name NVARCHAR(30),
email NVARCHAR(36),
lang NVARCHAR(10),
PRIMARY KEY(id)
)”;
if($this->hookup->query($this->sql) === true)
{
printf(“Table $this->tableMaster has been created successfully.<br/>”);
}
$this->hookup->close();
}
}
$worker=new CreateTable();
?>
check out the part highlighted in red , now i really don’t understand what that “query” is doing ? i checked all of the external files associated with this script and none had a method called query ?? is it an inbuilt query in PHP ?? if so i could’t find it in the docs . (maybe because i donno what object this method is associated with . ).
I would really appreciate any help .
Thank you.