Hey guys.
I've been racking my brain on how to do this. I don't know if it's just lack of sleep, if I'm over thinking it, or what.
But, I'm trying to figure out how to allow a domain (in my portfolio script) to be assigned to more than one category. Atm, here's how the SQL looks (just pulled it straight from install script, so includes some PHP code):
I've tried many things - and I'm just spent. Anyone have ideas? Please?
I've been racking my brain on how to do this. I don't know if it's just lack of sleep, if I'm over thinking it, or what.
But, I'm trying to figure out how to allow a domain (in my portfolio script) to be assigned to more than one category. Atm, here's how the SQL looks (just pulled it straight from install script, so includes some PHP code):
PHP:
// Category table
$db->query("
CREATE TABLE " . TABLE_PREFIX . "categories (
catid INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
title VARCHAR(100) NOT NULL,
description TEXT NOT NULL DEFAULT '',
keywords TEXT NOT NULL DEFAULT '',
PRIMARY KEY (catid)
)
") or $db->raise_error();
// Domain table
$db->query("
CREATE TABLE " . TABLE_PREFIX . "domains (
domainid INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
catid INT(10) UNSIGNED NOT NULL DEFAULT '0',
domain VARCHAR(100) NOT NULL,
description TEXT NOT NULL DEFAULT '',
keywords TEXT NOT NULL DEFAULT '',
registrar VARCHAR(100) NOT NULL,
expiry INT(11) UNSIGNED NOT NULL DEFAULT '0',
price DECIMAL(10,2) NOT NULL DEFAULT '0.00',
status ENUM('For Sale', 'Not For Sale', 'Pending Sale', 'Make Offer', 'Sold') NOT NULL,
added INT(11) UNSIGNED NOT NULL DEFAULT '0',
issite TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
hidden TINYINT(1) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (domainid),
KEY catid (catid),
KEY hidden (hidden)
)
") or $db->raise_error();
I've tried many things - and I'm just spent. Anyone have ideas? Please?





