SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Threaded View

  1. #1
    SitePoint Guru
    Join Date
    Oct 2011
    Posts
    657
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    select statement to get the all data with last sr_number save

    Hi..

    I just want to know what is the code to get the last inserted row on database.

    I tried max and last_insert_id yet it did not solve my problem

    Code:
    SELECT last_insert_id(sr_number), sr_date, Items, SubItems, ItemCode, DemandedQty FROM stock_requisition;
    it display all data from my database.

    Code:
    SELECT max(sr_number), sr_date, Items, SubItems, ItemCode, DemandedQty FROM stock_requisition;
    it only display last row.. but I need to display all data with all data with same sr_number
    for example :

    1204100002

    I attach my sample data from my database:

    Thank you so much
    Attached Images Attached Images


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •