MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Steve Veltkamp Date:September 5 1999 12:57am
Subject:Basic MyCart question - Newbie
View as plain text  
I'm still wet behind my ears so pardon the simpleness of my question, but have installed
MyCart using PHP and MySQL on a client site. Now I want to get everything going on other
client sites, using same database with different tables. 

MyCart isn't designed with such multiple installations in mind, because there are numerous
calls to individual table names. What I want to do is just be able to copy the db
structure and php files to a new client site, modify the Cart.php3 and have it point to
the right tables. 

I want to be able to declare in Cart.php3, for example 
$TB="QuestItems"; 
and then query by using 
$result=mysql_query("SELECT * FROM $TB WHERE Category='$CA' order by ItemID"); 

Or even better yet, declare 
$TB="Quest"; 
and then query by using 
$result=mysql_query("SELECT * FROM $TBItems WHERE Category='$CA' order by ItemID"); 
Since I can then append $TB in front of all the existing table calls. 

I have tried, even in the same PHP file 

$TB="QuestItems"; 
$result=mysql_query("SELECT * FROM $TB WHERE Category='$CA' order by ItemID"); 

Doesn't work, but 

$result=mysql_query("SELECT * FROM QuestItems WHERE Category='$CA' order by ItemID"); 

Does 


-- 
For mutual success, Steve Veltkamp, BizShop Online 
1713 E 3rd St, Pt Angeles WA 98362 
(360)452-2418 or (800)949-8029 Fax:(603)761-1410 
On the Web at http://www.bizshop.com, http://www.learnhow.to and http://sell-n-net.com 

Thread
Basic MyCart question - NewbieSteve Veltkamp5 Sep
  • RE: Basic MyCart question - NewbieDon Read6 Sep