Re: jobberBase 1.9 Development [ Started by navjotjsingh in Announcements : 22 replies ]

Guys any chance you could add a Google/Yahoo sitemap feature to jobberbase? There are free classes in PHP for this at phpclasses.org and elsewhere. It could be run via cron quite easily.

Keep up the good work and appreciate the update!

Re: Help with a Function [ Started by milezteg in General support : 2 replies ]

Hey you're awesome! Missed that somehow ... thanks so much for the quick reply =)

Topic: Help with a Function [ Started by milezteg in General support : 2 replies ]

In the sidebar on the home page you can see a list of all jobs in all cities. I have a huge list of cities so I am trying to shorten this list a bit by only showing cities with at least 2 jobs in them.

Here is the function:

[code] public function GetNumberOfJobsInOtherCities()
{
global $db;

$sql = 'SELECT COUNT(id) AS total FROM '.DB_PREFIX.'jobs WHERE is_temp = 0 AND is_active = 1 AND city_id IS NULL';

$result = $db->query($sql);

$row = $result->fetch_assoc();

return $row['total'];
}[/code]

I have tried a lot of things but I not a SQL guru. The following did not work:

[code]$sql = 'SELECT COUNT(id) AS total FROM '.DB_PREFIX.'jobs WHERE is_temp = 0 AND is_active = 1 AND city_id IS NULL GROUP BY id HAVING total > 3';[/code]

Any ideas guys??