
13/03/2012, 11:05
|
 | | | Fecha de Ingreso: mayo-2010 Ubicación: xalapa
Mensajes: 856
Antigüedad: 14 años, 9 meses Puntos: 23 | |
Respuesta: como hacer la relación entre tablas de prestamo-libro-usuario pero entonces la tabla pre_prestamo esta bien planteada?
seria por ejemplo, Prestar libro:
id_usuario..........................12
fecha_prestamo.................13-03-2012
fecha_devolucion...............18-03-2012
hago el insert
traigo el id generado:
id_prestamo................1
busco el libro
id_prestamo........................1
id_libro................................100
hago insert
id_pre_prestamo.................1
busco otro libro
id_prestamo........................1
id_libro................................450
hago otro insert
id_pre_prestamo.................2
asi seria? |