Hello,
I 'd like to know how to get SKU and Price with PHP 5 and SQLlite from Shopsite ?
Basically, I'd like to give the SKU to the PHP script and that returns the price.
Please advise
Thank You
Nick
$yourfile = "<path-to-db>/shopsite_db";
$database = new SQLiteDatabase($yourfile, 0666, $error);
if (!$database) {
$error = (file_exists($yourfile)) ? "Impossible to open, check permissions" : "Impossible to create, check permissions";
die($error);
}
$query = $database->query("SELECT ss_Price FROM ss_Products WHERE ss_SKU = '<MySKU>'", SQLITE_ASSOC, $query_error);
$row = $query->fetch();
print($row['ss_Price']);
Users browsing this forum: No registered users and 76 guests