如何设置价格行是否会很快显示更新

how to set if price row is comming soon than show update soon

how to set if price row is comming soon than show update soon

mysql

<?


    //connect to database

     mysql_connect('localhost','phone','pasword');
     mysql_select_db('phone');

//////Displaying Data/////////////
$id=$_GET['id']; // Collecting data from query string
if(!is_numeric($id)){ // Checking data it is a number or not
echo "Data Error"; 
exit;
}
$result = mysql_query("SET NAMES utf8"); //the main trick
$q=mysql_query("select * from price where id=$id AND TRIM(model) IS NOT NULL");

//Adds one to the counter
 mysql_query("UPDATE price SET counter = counter + 1 where id=$id ");

 //Retreives the current count
 $count = mysql_fetch_row(mysql_query("SELECT counter FROM price"));
$row=mysql_fetch_object($q);

echo mysql_error();

echo "<table class='hovertable'><tr><td><img src='admin/media/$row->photo' ></td></tr>";
echo "</table>";
?>

example

my rows

2000
3000
comming soon
4900

and this code is showing like this

2000
2000
3000
Warning: number_format() expects parameter 1 to be double, string given in
4900


and i want like this

2000
2000
3000
update soon
4900

how to solve this problem please help me to solve this issue

<?php if($row->price):?><tr class=\"style1\"><td width='200'><b>Price US $:</b></td><td>Price in Dollar: 

    <?php
    function currencyExchange($amount,$baseCurrency,$quoteCurrency) {
    $open = fopen("http://quote.yahoo.com/d/quotes.csv?s=$baseCurrency[0]$quoteCurrency[0]=X&f=sl1d1t1c1ohgv&e=.csv", "r");
    $exchangeRate = fread($open, 2000);
    fclose($open);
    $exchangeRate = str_replace("\"", "", $exchangeRate);
    $exchangeRate = explode(",", $exchangeRate);
    $results = ($exchangeRate[1]*$amount);
    $results = number_format ($results, 2);
    $amount = number_format ($amount);
    $timeStamp = strtotime($exchangeRate[2]);
    $timeStamp = date('F d, Y', $timeStamp);
    $timeStamp = "$timeStamp $exchangeRate[3]";


    echo "$results
";

    }

    // for additional currency ticker symbols visit: http://finance.yahoo.com/currency-converter
    $usd = array('USD','US Dollars');

    $INR = array('INR','Indian Rupees');
    $usd = array('usd','US DOLLARS');

    $b = str_replace( ',', '', $row->price );

    if( is_numeric( $b ) ) {
        $row->price = $b;
    }


    currencyExchange("$b",$INR,$usd); 
    ?></td></tr><?php endif; ?>

Test if the amount is numeric before trying to use functions that only work for numbers.

Replace:

$results = ($exchangeRate[1]*$amount);
$results = number_format ($results, 2);
$amount = number_format ($amount);

with:

if (is_numeric($amount)) {
    $results = ($exchangeRate[1]*$amount);
    $results = number_format ($results, 2);
} else {
    $results = 'update soon';
}

You don't need to call number_format() on $amount because you never print that value.

What about setting the column to something like 9999999999 ( which will get around numbers problem ) then testing the incoming for these numbers and if found then echo coming soon