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

Data of session delete on session_regenerate_id
Laravel Storage::get() does not return exif data of image
Error in joomla in custom php file
how to trigger a message in header section of webpage after perform an action in wordpress
DateTime function unix timestamp converting wrong
Webhost and Android Studio
Login required in phpdolphin viewing
Unable to access stylesheets in codeigniter
Change total woocomerce order weight
WordPress - request post by url with custom field value
$_SERVER['REQUEST_METHOD']='POST'; not working
CMS suggestion with multi language, and multi admin support
Error when adding FIRST record to table
Apache CURL error SSL: CA certificate set, but certificate verification is disabled
Prevent duplicate records from submitting; PHP & MySQL
How to add some textfield in form register (laravel generator infyom)?

Categories

HOME
ionic2
webview
bots
plaid
nsview
nsis
web2py
greasemonkey
cocotb
hspi
wine
xamarin-zebble
amazon-elb
google-tasks-api
web-deployment
google-sites
node-webkit
unity-container
bosun
connection-refused
channel
vuforia
python-imageio
sfml
openbr
envoy
xenapp
snap-framework
series
universal
listjs
apptentive
amazon-kms
pdfminer
spinner
gitolite
plane
cloudera-sentry
raytracing
contactless-smartcard
google-prediction
elasticsearch-aggregation
latexml
android-5.0-lollipop
karabiner
apache-modules
instafeedjs
researchkit
jsf-2.3
wininet
fragmentstatepageradapter
static-methods
persistent-object-store
taco
management-studio-express
in-app-billing
largenumber
chicagoboss
gitlab-omnibus
featuretoggle
blockquote
vdm-sl
bootstrap-wysiwyg
explain
unidata
kotlin-android-extensions
mgwt
sablecc
mutators
uno
zend-mail
berkeley-db-xml
siena
windows-messages
forceclose
cidr
nosql-aggregation
sensormanager
insertonsubmit
quickgraph
objective-c-runtime
delphi-xe4
django-filebrowser
email-verification
gitx
zend-pdf
getproperty
yuidoc
will-paginate
server-variables
vows
airprint
nsconnection
gaelyk
hungarian-notation
chunking
ccnet-config
iphone-sdk-4.3
google-translator-toolkit
external-sorting
.net-client-profile

Resources

Encrypt Message