[PHP] Help with this- pointers

2001-07-24 Thread Clayton Dukes

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




Re: [PHP] Help with this- pointers

2001-07-24 Thread Sean Cazzell

The $foo-bar() syntax is actually object references in PHP, not
pointers.  See the docs in the php manual regarding objects in PHP.


Kind Regards,

Sean


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]