Renamed multiple database tables
This commit is contained in:
@@ -10,7 +10,7 @@ class API_vendors extends API
|
||||
{
|
||||
public function getVendors($returnBoolean = false)
|
||||
{
|
||||
list($query, $types, $params) = $this->buildDynamicQuery('vc_vendors');
|
||||
list($query, $types, $params) = $this->buildDynamicQuery('autop_vendors');
|
||||
|
||||
$items = $this->generalGetFunction($query, $types, $params, $returnBoolean, 'Vendor');
|
||||
|
||||
@@ -20,11 +20,11 @@ class API_vendors extends API
|
||||
public function createVendor()
|
||||
{
|
||||
if (isset($this->data['vendor_image'])) {
|
||||
$query = "INSERT INTO vc_vendors (vendor_uuid, vendor_name, vendor_slugify, vendor_description, vendor_enabled, vendor_create_timestamp, vendor_image) VALUES (UUID(), ?, ?, ?, ?, ?, ?)";
|
||||
$query = "INSERT INTO autop_vendors (vendor_uuid, vendor_name, vendor_slugify, vendor_description, vendor_enabled, vendor_create_timestamp, vendor_image) VALUES (UUID(), ?, ?, ?, ?, ?, ?)";
|
||||
$stmt = $this->prepareStatement($query);
|
||||
$stmt->bind_param('ssssis', $this->data['vendor_name'], $this->data['vendor_slugify'], $this->data['vendor_description'], $this->data['vendor_enabled'], time(), $this->data['vendor_image']);
|
||||
} else {
|
||||
$query = "INSERT INTO vc_vendors (vendor_uuid, vendor_name, vendor_slugify, vendor_description, vendor_enabled, vendor_create_timestamp) VALUES (UUID(), ?, ?, ?, ?, ?)";
|
||||
$query = "INSERT INTO autop_vendors (vendor_uuid, vendor_name, vendor_slugify, vendor_description, vendor_enabled, vendor_create_timestamp) VALUES (UUID(), ?, ?, ?, ?, ?)";
|
||||
$stmt = $this->prepareStatement($query);
|
||||
$stmt->bind_param('ssssi', $this->data['vendor_name'], $this->data['vendor_slugify'], $this->data['vendor_description'], $this->data['vendor_enabled'], time());
|
||||
}
|
||||
@@ -44,7 +44,7 @@ class API_vendors extends API
|
||||
|
||||
public function getVendorSlugify()
|
||||
{
|
||||
$query = "SELECT * FROM vc_vendors WHERE vendor_slugify = ?";
|
||||
$query = "SELECT * FROM autop_vendors WHERE vendor_slugify = ?";
|
||||
$stmt = $this->prepareStatement($query);
|
||||
$stmt->bind_param("s", $this->data['vendor_slugify']);
|
||||
$this->executeStatement($stmt);
|
||||
@@ -54,11 +54,11 @@ class API_vendors extends API
|
||||
public function editVendor()
|
||||
{
|
||||
if (isset($this->data['vendor_image'])) {
|
||||
$query = "UPDATE vc_vendors SET vendor_name = ?, vendor_description = ?, vendor_enabled = ?, vendor_image = ?, vendor_modified_timestamp = ? WHERE vendor_uuid = ?";
|
||||
$query = "UPDATE autop_vendors SET vendor_name = ?, vendor_description = ?, vendor_enabled = ?, vendor_image = ?, vendor_modified_timestamp = ? WHERE vendor_uuid = ?";
|
||||
$stmt = $this->prepareStatement($query);
|
||||
$stmt->bind_param("ssisis", $this->data['vendor_name'], $this->data['vendor_description'], $this->data['vendor_enabled'], $this->data['vendor_image'], time(), $this->data['vendor_uuid']);
|
||||
} else {
|
||||
$query = "UPDATE vc_vendors SET vendor_name = ?, vendor_description = ?, vendor_enabled = ?, vendor_modified_timestamp = ? WHERE vendor_uuid = ?";
|
||||
$query = "UPDATE autop_vendors SET vendor_name = ?, vendor_description = ?, vendor_enabled = ?, vendor_modified_timestamp = ? WHERE vendor_uuid = ?";
|
||||
$stmt = $this->prepareStatement($query);
|
||||
$stmt->bind_param("ssiis", $this->data['vendor_name'], $this->data['vendor_description'], $this->data['vendor_enabled'], time(), $this->data['vendor_uuid']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user