YUME|TEC stores its product catalogue, user accounts, categories, and purchase records in a MySQL database calledDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/wreyesus/Sencillo_Carrito_de_Compras_en_PHP/llms.txt
Use this file to discover all available pages before exploring further.
tienda. The repository ships with a complete SQL dump at BD/bd.sql — generated by phpMyAdmin 2.11.4 against MySQL 5.1.57 — that creates all four tables and seeds them with sample data. This page walks through creating the database, importing the dump, and verifying that the data loaded correctly.
Schema overview
TheBD/bd.sql file defines four tables:
| Table | Description |
|---|---|
categorias | Stores the three product categories (procesadores, motherboards, rams). Each row tracks how many items the category contains. |
productos | Holds all 31 products. Each product belongs to a category via id_cat and carries a name, manufacturer, price, image filename, and description. |
usuario | Registered customer accounts. Stores nickname, first and last name, country, city, password, and registration date. |
compra | Purchase records linking a product (id_producto) to a user (idusuario) with an auto-updating timestamp. |
compra table is empty in the dump — it fills at runtime when customers complete an order.
Import steps
Create the database
Open phpMyAdmin or a MySQL CLI session and run:The
latin1 character set matches the charset used throughout bd.sql, so product names and descriptions import without encoding errors.Import the SQL dump
From the command line, run:Enter your MySQL root password when prompted. The command pipes the entire dump into the
tienda database.Alternatively, use phpMyAdmin:- Select the
tiendadatabase in the left-hand panel. - Click the Import tab.
- Click Choose File and select
BD/bd.sqlfrom the project directory. - Leave all other settings at their defaults and click Go.
Sample data
The dump inserts three category rows that drive the store’s navigation:contiene column (value 10 for each) is used by the application to control pagination — it represents the number of products displayed per category page. The dump then seeds 31 products spread across these three categories: 10 processors (category 1), 10 motherboards (category 2), and 10 RAM modules (category 3), plus one extra test product assigned to a non-existent category 4.
The database uses the
latin1 character set with a Spanish collation (latin1_swedish_ci for most tables, utf8_spanish2_ci for the descripcion column of productos). If you connect with a client or application that assumes UTF-8, accented characters in product descriptions — such as é, ó, ñ — may appear as garbled sequences like cach? or n?cleos. Ensure your connection character set matches by running SET NAMES latin1 or by verifying the charset in Connections/tienda.php.Sample users
The dump includes several test user accounts. The primary one is:ryuzaki and password hola to test the authenticated shopping flow without registering a new account.