我是如何从mysql数据库中获取行的列值

I want to get rows value from two tables i.e.

  • table1 sale(id,name invoiceno,saleprice,total) and
  • table2: invoice(id,invoiceno,saledisc,disctotal)

I want the rows from both tables where invoiceno is common.

Anyone's co-operation is highly appreciated.

Use join to select value from 2 tbl

$sq="SELECT s.*, i.*
FROM sale s
INNER JOIN invoice i
ON s.invoiceno=i.invoiceno";

I'll help you with this one, although it is so basic you better consider an online SQL course before asking any further questions.

SELECT * FROM SALE INNER JOIN INVOICE ON sale.invoiceNo = invoice.invoiceNo