Skip to content

Database Functions

Complete reference for database access functions.

Returns PostgreSQL connection resource.

$connection = get_db_connection();

get_products_paginated($page, $per_page, $filters)

Section titled “get_products_paginated($page, $per_page, $filters)”

Retrieve paginated product list.

Get single product details.

Search products in database.

Retrieve hierarchical category tree.

Get single category details.

get_product_price_history($product_id, $days)

Section titled “get_product_price_history($product_id, $days)”

Retrieve price history for a product.