SQLITE

Smart Tags | Page Variables | Session Variables | Snippets | PHP | Language Variables (Constants) | SQLITE | GET variables | Templates Markup

 SQLITE Description Result

Your SQLITE database file contains all your product, category and information pages content. You can query your database using the UPDATE, SELECT, and DELETE statements in your PHP files.

This example is a simple DELETE to remove a product with the product_id of 1

<?php
sqlite_query($sDB,"DELETE from product where product_id='1'");
?>

Deletes the product with the product_id of 1

This example shows you how to view all the fields for a table by using the SELECT statement in one of your PHP files.

<?php

$rs = sqlite_fetch_array(sqlite_unbuffered_query($sDB,"SELECT * from category limit 1"));

foreach($rs as $field=>$value) {
print $field.'<br />';
}
?>

category_id
url
vendor_category_id
vendor_id
user_id
stores
type
name
heading
menu_title
parent_id
place
products
fid
description
subs
layout
state
nl2br
status_id
ordering
discount
discount_code
ext_url
meta_keywords
meta_description
created
updated

<?php

sqlite_query($sDB,"update product set price='20' where sku='XYZ'");
?>

Updates the price for the product with the sku of XYZ to $20.00

Making changes to your SQLite database

Data for your website is stored in two databases: the central vendo MySQL database, which contains customer and order records, which you do not have access to, and your local SQLite database, which contains your product data, which you have full access to. (You can also add tables and fields to your SQLite database). Keep in mind you should not alter existing table structure unless you really know what you are doing.

The above SELECT example shows you how to query your sqlite database to show fields for the category table. Your database also contains the following tables. Note that table structure is subject to change.

Running queries using the SQLite Admin function

If you want to update your database manually you can also execute queries using the SQLite Admin function.