SQLStatement1 = "SELECT * FROM product_or_detail order by MID(bill_id,3,6) desc"
'SQLStatement1 = "select * from product_or_detail order by bill_id desc "
cmd2 = New MySqlCommand(SQLStatement1, SQLConnection)
Dim a As MySqlDataReader = cmd2.ExecuteReader
a.Read()
If a.HasRows Then
count = a("bill_id")
Dim billid_sum As Integer
Dim b As String
b = count
txtbillid.Text = b.Substring(2)
billid_sum = Convert.ToInt32(txtbillid.Text)
billid_sum = billid_sum + 1
txtbillid.Text = "BO" + Convert.ToString(billid_sum)
Else
txtbillid.Text = "BO1"
End If