Help with this-> pointers
| From: | Clayton Dukes | Date: | Wed, 25 Jul 2001 00:32:05 +0000 |
| Subject: | Help with this-> pointers | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-59462@lists.php.net to get a copy of this message | ||
Hi everyone,
Forgive my ignorance, I'm trying to re-write an old contact databse that didn't work. I
have everything written out, but the old code used pointers (ie: this->$db).
I'm not familiar with that type of code, how can I convert it?
---snip---
$sql="select distinct site from contacts_data where site != '' order by site";
$db->query($sql);
while($db->next_record())
---snip---
And how can I rewrite it to work?
here's a copy of my table:
CREATE TABLE contacts_data (
id bigint(20) DEFAULT '0' NOT NULL auto_increment,
last_name varchar(40) DEFAULT '' NOT NULL,
middle_initial char(1) DEFAULT '' NOT NULL,
first_name varchar(40) DEFAULT '' NOT NULL,
work_phone varchar(20),
extension varchar(4),
cell_phone varchar(20),
job_desc varchar(80),
department varchar(30),
site varchar(30),
cell_pre_email varchar(20),
cell_post_email varchar(20),
cell_unused varchar(20),
email varchar(160),
web varchar(160),
home_phone varchar(20),
home_street varchar(50),
home_city varchar(20),
home_state char(2),
home_zip varchar(5),
work_street varchar(50),
work_city varchar(20),
work_state char(2),
work_zip varchar(5),
notes varchar(255),
PRIMARY KEY (id),
UNIQUE id (id),
UNIQUE last_name (last_name,middle_initial,first_name)
);
TIA!
-Clayton