Search the Community
Showing results for tags 'price'.
-
I have a Mysql table where I store prices of a product. I have the values in "varchar" format because I needed to include "decimals" in the prices(for eg. 15.30) and "int" doesn't allow that. Having done that, when ever I filter the products by prices in Ascending or Descending order, they don't show up in proper order. It seems like the decimal in the prices is messing up the order. Is there a way to fix this so that the php query can filter the prices in proper order despite the decimals? Here's the eg of the query. $get_records = $db->prepare("SELECT * FROM records ORDER BY records.price DESC");
-
Hi, I am David. I hope be good, my friends. Excuse me that I can't speak English good. My job is make site with PHP. But it has very low income in my country. I make site with all the features of Facebook that it be written base completely. And it has high security. I intend sell it in The America. Price my site is about 3000 Dollar in my country. It is very low price for site that be worked on it for about two years. You think that what can I sell it, in the America?
-
Hi again PHPFreaks I'm building on my new local project in which I wish to create a working function for a future e-commerce. But I ran into a problem. Please open following picture in order for me to illustrate my problem. http://i1227.photobucket.com/albums/ee433/rec0ill/example_zpsacd52b0c.jpg The picture represents what I want. My only problem is that I have no idea how to make the "Total price:" value (which is 1.2€ on the picture) to match the quantities above. Lets say a costumer chose 10 quantities - in that case i would like it to automaticly change the total price value to 12€ instead, so that it matches the amount of quantities chosen. How would i be able to do this? Thx in advance - r e c 0 i l
- 7 replies
-
- price
- match amount
-
(and 2 more)
Tagged with:
-
I'm using this bitcoin price ticker that is using Mt.Gox but they're no longer in service unfortunately. I'm trying to replace Mt.Gox with blockchain or something similar. Can anyone please help me fix this? I tried https://www.bitstamp.net/api/ticker/ and https://blockchain.info/ticker but neither are working. I'm doing this for my site http://www.bitcoinvalues.net. Thanks <?php //first fetch the current rate from MtGox $ch = curl_init('https://mtgox.com/api/0/data/ticker.php'); curl_setopt($ch, CURLOPT_REFERER, 'Mozilla/5.0 (compatible; MtGox PHP client; '.php_uname('s').'; PHP/'.phpversion().')'); curl_setopt($ch, CURLOPT_USERAGENT, "CakeScript/0.1"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $mtgoxjson = curl_exec($ch); curl_close($ch); //decode from an object to array $output_mtgox = json_decode($mtgoxjson); $output_mtgox_1 = get_object_vars($output_mtgox); $mtgox_array = get_object_vars($output_mtgox_1['ticker']); ?> <br/> <br/> Last: <?php echo $mtgox_array['last']; ?><br/> High: <?php echo $mtgox_array['high']; ?><br/> Low: <?php echo $mtgox_array['low']; ?><br/> Avg: <?php echo $mtgox_array['avg']; ?><br/> Vol: <?php echo $mtgox_array['vol']; ?><br/>