Updated SQL with sample code for practice 7

parent b98ab068
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/ -- https://www.phpmyadmin.net/
-- --
-- Servidor: localhost:3306 -- Servidor: localhost:3306
-- Tiempo de generación: 18-03-2025 a las 16:21:19 -- Tiempo de generación: 19-03-2025 a las 15:50:42
-- Versión del servidor: 10.11.8-MariaDB-0ubuntu0.24.04.1 -- Versión del servidor: 10.11.8-MariaDB-0ubuntu0.24.04.1
-- Versión de PHP: 8.3.6 -- Versión de PHP: 8.3.6
...@@ -59,6 +59,17 @@ CREATE TABLE `loan` ( ...@@ -59,6 +59,17 @@ CREATE TABLE `loan` (
`end` date DEFAULT NULL `end` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Volcado de datos para la tabla `loan`
--
INSERT INTO `loan` (`id_user`, `id_book`, `status`, `start`, `end`) VALUES
(1, 1, 'available', NULL, NULL),
(1, 2, 'on loan', NULL, NULL),
(1, 3, 'available', NULL, NULL),
(1, 4, 'available', NULL, NULL),
(1, 5, 'available', NULL, NULL);
-- -------------------------------------------------------- -- --------------------------------------------------------
-- --
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
import { useState, useEffect } from 'react'; import { useState, useEffect } from 'react';
import BookList from '../../components/booklist'; import BookList from '../../components/booklist';
import config from '../../config';
import { fetchAvailableBooks } from '../../api'; import { fetchAvailableBooks } from '../../api';
export default function Page() { export default function Page() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment