SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2012
    Location
    Karkala, India
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Table number conversion and display no of records above the table

    http://furious-earth-6304.herokuapp....&commit=Search

    in this how to convert Tel.no table displaying numbers 234567.0 to 234567

    how to add caption above table that to display no of records

    for code please refer

    http://www.sitepoint.com/forums/show...isplay-results

    please any help would be great..................

  2. #2
    Avid Logophile silver trophy
    ParkinT's Avatar
    Join Date
    May 2006
    Location
    Central Florida
    Posts
    2,287
    Mentioned
    182 Post(s)
    Tagged
    4 Thread(s)
    If the Telephone numbers are stored as :integer in your database (your migration shows it as string) it will display as you described.
    Of course, you can take each returned value and add xxxx.to_i (in this case, since we know the decimal portion is always zero)
    Code:
    @phone_records.count
    Will give you the number of records.
    Don't be yourself. Be someone a little nicer. -Mignon McLaughlin, journalist and author (1913-1983)


    Literally, the best app for readers.
    Make Your P@ssw0rd Secure
    Leveraging SubDomains


Tags for this Thread

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
  •