SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Oct 2011
    Posts
    658
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    problem in datatype

    Hi..

    I input numbers in textboxes.
    When I did not input number in my textbox or textbox is blank and i click save it save as 0.00 I used double data type.

    I want to happen is if I did not input number or data in my textbox no datra will save in my database.

    THank you

  2. #2
    SitePoint Enthusiast
    Join Date
    May 2011
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I believe that if you are using Double as the column type, the attribute is: ZeroFill. I don't know if there is a way around it via the database?
    Last edited by storm925; Mar 9, 2012 at 00:28. Reason: correction

  3. #3
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,501
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    That kind of validation must be done in your PHP code. You only execute the insert query when all values are correct.

  4. #4
    SitePoint Guru
    Join Date
    Oct 2011
    Posts
    658
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what syntax should i used for validating?

    Thank you


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
  •