php


Mysql - Simple Add to cart database is being complicated.


I am stuck in a situation, I have three tables customer , stock , trolley. In customer I have fields id (pk) , username, password, date of birth.
In stock I have fields stock number , quantity , id (pk). While in the trolley I have fields cart_id (pk) ,customer_id (fk) ,paid.
Now My scenario is I want to store the stock selected by customer , in the trolley . But I dont know how it will happen. Stock table's id (pk) is auto increment and so does trolley's cart_id (pk) is auto increment. How can I store the stock selected by user and the cart id in separate table. In the end its my requirement that after saving the data , I need to store customer_id, cart_id and paid in trolley table too.

Related Links

How can i sleep the execution of each iteration of for loop in php
How to store api url in zf2 local.php [closed]
php variable not saving output of query
RewriteRule: bad flag delimiter
Popup Button not working inside Ajax success via JSON
How to execute Jess in php
How to get different Wordpress category links within one php file?
What should an HTML 5 form submit when no value is set [duplicate]
How to present enum table property in Laravel Model
Send request “post” with hidden field and wordpress
PHP and MySQL pagination issue
php - performance of continue state
ZF2 Model getters and setters mismatching form element names
Selecting and matching data from 3 tables
How to get the request data in codeigniter
Format dynamic ul list generated by php

Categories

HOME
mpdf
verification
freeradius
facebook-messenger
long-integer
mousemove
haproxy
loopbackjs
ews
portable-class-library
gentelella
flurry
firebase-dynamic-links
static-analysis
telegraf
anchor
spring-security-oauth2
siesta
nsstring
outlook-restapi
susy-sass
salt-cloud
codefluent
infrared
akka-persistence
weex
fusetools
hdmi
echosign
amazon-cloudtrail
cube
guice
tilemill
mongodb-3.4
fotorama
subclassing
assemblies
transparency
moinmoin
asihttprequest
common-table-expression
music21
.net-micro-framework
cloudwatch
head.js
hibernate-ogm
sigsegv
datediff
mongodb-aggregation
mobile-angular-ui
dex
maatwebsite-excel
pbx
nclam
msg
fuzzer
dmarc
p6spy
django-testing
raw-sockets
unsigned
adp
apple-configurator
verisign
as3-api
psd
teensy
mousehover
cfwheels
gql
supersocket.net
whitespace-language
deque
python-curses
mxe
sql-processor
rebar
visual-c++-2012
mfmessagecomposeview
git-reset
nachos
saga
ggts
yii-booster
form-for
dynamic-rdlc-generation
flv
cmath
2d-vector
xmlwriter
linkbutton
ip-geolocation
hardcode
kohana-auth
airprint
ognl
servlet-container
3des
anonymous-types
downgrade
pinax
raw-data
asdoc
oracle-pro-c
downloadfile
code-camp

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App