PHPBuilder - Creating a Printer Version Grab Method Page 3



RSS Twitter
Articles Html

Creating a Printer Version Grab Method - Page 3

by: Jim Fletcher
|
April 1, 2004

Here is an example SQL statement used to set up a user:
INSERT INTO `member` VALUES (1, 'yourdomain.com', 'yourpassword', 
'Your Company Name', 'yourname@yourdomain.com', 'y', 
'customtemplate.html', 'Website Page From !MAILFROMNAME!', 
'yourdomain.com', 'yourlogo.jpg', 
'The following page from the Your Company Name 
website\r\n(YourDomain.com) was suggested to you by: 
!MAILFROMNAME!.\r\nPage Title: !TITLE!\r\nLink: 
!URL!\r\nNote from !MAILFROMNAME!:\r\n!MESSAGE!', 
'Your Company Name');
Next we create the cache table. It is relational to the member table via the username field. Each record will store the URL of the respective webpage in all lowercase, the timestamp of when it was added to the table for use in expiration, the <head> title of the webpage, and the printable content.
CREATE TABLE `cache` (
  `id` tinyint(7) NOT NULL auto_increment,
  `username` varchar(25) NOT NULL default '',
  `url` varchar(100) default NULL,
  `date` varchar(20) default NULL,
  `title` varchar(50) default NULL,
  `body` blob,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `id` (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1 ;

« Previous Page
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
10
Next Page »

Comment and Contribute

Your comment has been submitted and is pending approval.

Author:
Jim Fletcher

Comment:



Comment:

(Maximum characters: 1200). You have characters left.