View Single Post
  #7 (permalink)  
Old 08-21-08, 01:26 AM
<?Wille?> <?Wille?> is offline
Junior Code Guru
 
Join Date: Jan 2004
Location: Helsinki, Finland
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
Would it not be easyer to just go with a query like this?
PHP Code:

$query mysql_query("SELECT * FROM biller WHERE account LIKE ($_POST[number]) AND calldate LIKE '%($_POST[month])%' AND calldate LIKE '%($_POST[year])%'"); 

took out all the database parts and tested it locally, prints a table just fine. so the problem is probably that your not finding anything in the database.

You can select COUNT(*) or use mysql_num_rows() to find out how many matches you got. COUNT(*) is faster if there are alot of them

btw, the query where you use $_POST[number] as a argument. Your saying to mysql that your looking for something similar, but not specifying any wildcard ( the % sign).
Reply With Quote