Topic: CheckPosterEmail is killing my server [ Started by dayjobfinder in Bug reports : 1 replies ]

Hi, I've been running jobberbase for a few months now, and I like it quite a bit. I've started getting a lot of traffic to it (5 - 10,000 visitors/day) and my job database is getting quite large (around 6,000 jobs).

I think I'm really starting to push the tool to its limits because it's really taking a large toll on my server - I have some ideas why and I've actually started optimizing several of the queries . . . but there's one I can't figure out.

In /_includes/class.Job.php there's a function called CheckPosterEmail() that looks like this . . .

--
// Check if the poster of this post has posted before with this e-mail address
public function CheckPosterEmail()
{
global $db;
$sql = 'SELECT poster_email FROM jobs
WHERE poster_email = "' . strtolower($this->mPosterEmail) . '" AND id <> ' . $this->mId . ' AND is_temp = 0
AND (is_active = 1 OR (is_active = 0 AND DATEDIFF(NOW(), created_on) > 30))';
$result = $db->query($sql);
$ …

Re: modules for payment [ Started by matteoraggi in jobberBase developers looking for jobs : 5 replies ]

What needs to happen to add this to the job application section . . . so, when someone is applying to te job?

Thanks!

Re: How to store applicant name and email address? [ Started by dayjobfinder in General support : 12 replies ]

No need to reply, I figured it out.

Topic: How to store applicant name and email address? [ Started by dayjobfinder in General support : 12 replies ]

When people come to the site and apply for a job, I know that the job id, ip address and datestamp are written to the job_applications table.

I'd like to also store the user's name and email address when someone submits an application.

I've added two fields to the job_applications table:

user_email
user_name

but I'm having trouble with my insert statement within class.JobApplication.php

I know I need to alter line 33 to read:

$sql = 'INSERT INTO job_applications (job_id, created_on, ip, user_email, user_name)

but I don't know how to correctly insert the variables from the $data array that is created in page_apply.php

Can anyone provide a little direction . . . I'm guessing it should look something like:

VALUES (' . $this->mJobId . ', NOW(), "' . $ip . '", "' . emailvariablegoeshere . '", "' . namevariablegoeshere . '")';

Any help you can provide would be appreciated.

Thanks! …