Database query (read)
ps_db_query
Looks things up directly in the shop's database when no other tool shows them, without changing anything.
TellMyShop Free: No. This tool is only in TellMyShop Pro. TellMyShop Free has only ready reports that read your store.
Ask Claude
„Check in the database which active products have weight 0. The courier needs that list.”
Example answer
SELECT id_product, reference FROM ps_product WHERE active = 1 AND weight = 0 LIMIT 200: 17 rows. 45 LMP-01, 77 LMP-07, 112 SOF-OSLO-3 ...
Technical details
SERVICE AREA (reading works without a switch). Reads from the shop database: SELECT, SHOW, DESCRIBE, EXPLAIN (one statement, no comments), in a read-only transaction. Table prefix ps_. At most 200 rows (LIMIT 200 is added when missing), long values cut, emails, phone numbers and IP addresses masked. Always blocked: employees, permissions, configuration (use ps_config, which hides secrets), API accounts and the connector's own tables. Tables with customers' personal data (recognised by their columns, also in third-party modules) follow the level set by the owner: off = blocked; pseudonymised = personal columns masked and only plain columns, * and COUNT/SUM/AVG in the select list (no aliases, functions, UNION, WITH); full = time-limited full access.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| sql | string | yes | SQL query (read). Max 20,000 characters. |
Limits
Read only, works without a switch. One statement, max 20,000 characters, max 200 rows. At level pseudonymised a personal column may appear only in the select list (where it is masked), never in WHERE, JOIN, ORDER BY or GROUP BY; subqueries, variables and ORDER BY a column number are refused, and MySQL error details are hidden. IP addresses are masked in every format, including those stored as numbers. Masked emails, phone numbers and addresses become stable pseudonyms (Klient-xxxxxx): HMAC with a daily key, so the same value gets the same alias within one day.
Related tools
- Database change ps_db_execute
- PrestaShop settings ps_config
- Search products ps_search_products
Use cases with this tool
- Report products that haven't sold in 12 months
- Anonymised order report by carrier and region
- Fix data in bulk, tried on a test copy first
- Find orphaned rows and leftover data in the database
- Custom product export for a supplier or marketplace
- Pull a custom report straight from the shop's data
- Fix a bad import across hundreds of products, with a copy of every change
Last updated: 2026-10-11