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

Please help me with my comment sections sql query
How to extract data from this JSON ? [closed]
Image cropping and thumb creation
How to draw a name in a database [duplicate]
PHP: Generating category/subcategory UL list from array?
wikipedia servers gzip content
How to escape ' in setParameter
onclick submit check php
php: how to shoow session variable on every php page [duplicate]
Multilingual site: switching languages
jQuery hide() flicker
Cascading dropdown with jQuery
Regex to match alphanumeric characters, underscore, periods and dash, allowing dot and dash only in the middle
Setting Facebook PHP SDK access_token with setAccessToken()
How do I modify the path used by exec in php
Broken link check while initiating cron-multi

Categories

HOME
jboss
focus
seedstack
enums
antd
qooxdoo
visualforce
linker
gprs
firebase-dynamic-links
tfs2010
driver
scrape
fbloginview
tiff
outlook-restapi
xbox360
reselect
spring-shell
gitkraken
yii2-basic-app
anova
fluent-migrator
websphere-portal
software-packaging
docx4j
netbios
delayed-job
xcrun
winrm
java-stream
polyml
ms-solver-foundation
identify
mv
sspi
tidal-scheduler
grails-spring-security
music21
intellij-lombok-plugin
aws-kinesis-firehose
comm
datediff
simple-schema
mobile-angular-ui
emacs25
business-rules
perl-data-structures
cocoa-bindings
yui3
mathjs
tsqlt
gcloud-node
uibinder
processor
psd
openmrs
management-studio-express
voronoi
msgpack
css-paged-media
kognitio-wx2
jolie
microsoft-expression-web
dmake
tabris
object-code
treeline
nachos
forio-contour
hyperloglog
miglayout
sql-function
hotswap
profiles
assetic
strcmp
pbkdf2
eclim
iirf
objective-c-runtime
insertion
axacropdf
2d-vector
dojo-1.9
system-requirements
semantic-merge
multiscaleimage
daap
chronometer
voice-recording
word-frequency
trialware
firebird1.5
flymake
fitch-proofs
zend-server-ce
asio
getopts
tablet-pc
fragment-identifier
channelfactory
subtext

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