[Top] [All Lists]

Re: Searchbox values do not work correctly

Subject: Re: Searchbox values do not work correctly
From: David Powers
Date: Fri, 21 Sep 2007 16:53:35 +0100
Newsgroups: macromedia.dreamweaver.appdev

The_FedEx_Guy wrote:
When I leave the whole selection as "Any" I get this: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/unitedpr/public_html/2.php on line 178

Use echo to display the SQL query. It's possible that I have made a mistake in the code, resulting in a failed query.

Also I was wondering how do I format the displayed price as "?200,000.00" and or if I can enter it as a currency value in the database?

As I said before, all numbers must be stored in a database with no punctuation other than the decimal point. Use the PHP function number_format() to format the figure.

echo '£' . number_format($Cost, 2);

David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)

<Prev in Thread] Current Thread [Next in Thread>