Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: BrannigansLaw on January 11, 2014, 12:09:15 AM



Title: Blockchain mass send api. SQL data type to use? $5 amazon voucher as a thank you
Post by: BrannigansLaw on January 11, 2014, 12:09:15 AM
Delete


Title: Re: Blockchain mass send api. SQL data type to use? $5 amazon voucher as a thank you
Post by: bitpop on January 11, 2014, 04:34:40 AM
Id use bigint. The api doesn't care about what you use internally.. Your just sending numbers.

Ps never INSERT anything without http://us1.php.net/mysql_real_escape_string


Title: Re: Blockchain mass send api. SQL data type to use? $5 amazon voucher as a thank you
Post by: jebwizoscar on January 11, 2014, 08:04:22 AM
just use bigint or int, amount in satoshi

display in btc: sprintf("%.8f",$sat);


Title: Re: Blockchain mass send api. SQL data type to use? $5 amazon voucher as a thank you
Post by: bitpop on January 11, 2014, 08:51:55 AM
Then text. KISS


Title: Re: Blockchain mass send api. SQL data type to use? $5 amazon voucher as a thank you
Post by: BrannigansLaw on January 11, 2014, 10:57:28 AM
Oooohh I'm a fool. Just realised I should store in Bigint and just divide by 100000000 to get satoshi! oh well its a learning process :D