Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^3: Unable to pass 0 number through form with CGI DBI backend

by marto (Cardinal)
on Sep 12, 2015 at 10:56 UTC ( [id://1141764]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Unable to pass 0 number through form with CGI DBI backend
in thread Unable to pass 0 number through form with CGI DBI backend

Sure, if you throw away data before inserting it into your database, when you query the database in future the data in quesiton won't be there. I'm not sure what you expect. Likely your post does not properly describe your problem.

Replies are listed 'Best First'.
Re^4: Unable to pass 0 number through form with CGI DBI backend
by ramachandrajr (Novice) on Sep 12, 2015 at 11:02 UTC
    i want to keep the zeros in the field as zeros ,i dont wanna loose them suppose some one enters 7890123456 ,in db also it should be 7890123456 (!)not 789123456 . Now how can i not lose those zeros when passing from a cgi script 7890123456 ->turns into->789123456.Thats not what i want i want perfectly intact data

      If you read my first reply you'd see this has nothing to do with passing data from CGI, or DBI. I demonstrate that you're stripping the zeros ($mob =~ s/[:;$%&@<>?]//gi;). My example shows that basic debugging will show you that your code isn't doing what you think it is. If you're going live with some critical service tomorrow (as you mentioned) this would be a warning flag for me regarding what you're delivering. For the immediate issue consider the solution presented by poj.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1141764]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-03-28 14:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found