Hey guys I need help

I am creating a invoice application where user can add invoice.

The database of the invoice contains :

invoiceid
invoice_number
customer_name
product_name
product_qty
product_price
invoice_remarks

Now If a user adds more product what do i do? I mean how can I add 2 product info in the database with the same in the same row? or is there any other way to do it?

Thanks in advance

you should design your table like this
table invoice_master
columns:
invoiceid
invoicenumber
customer_name
<invoiceid is the primary key>
and

table invoice_detail
id
invoiceid
product_name
product_qty
product_price
invoice remeark
[or other columns that would fit to invoice detail]
<id is the primary key>

in this table structure you can manage well the database user can add multiple product even if it is thesame invoiceid from invoice detail,

hope it can help

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.