PDA

View Full Version : Error at line 108 contacts.class.php


mrmagoo
13-01-06, 10:49 AM
I don't know if you would call this a patch but there seems to be a probelm with your contact.class.php at line 108...

$q->addWhere('company_name = '.$this->contact_company);

should be...

$q->addWhere('company_name = "'.$this->contact_company."'");


Unless of course I'm missing something... Please let me know if there is a better way to fix this problem or a more appropriate area to post this sort of information. I am after all I am less than a few days old on this dotproject thing.

mrmagoo
13-01-06, 11:05 AM
Oh... and when importing a multiple vCard file I added...

this near line 29 to the vcard import file

foreach ($cardinfo as $ci) { //one file can contain multiple vCards

if(!$ci['N'][0]['value'][0][0] && !$ci['ORG'][0]['value'][0][0] || !$ci['N'][0]['value'][0][0] && $ci['ORG'][0]['value'][0][0] == 'False'){continue;}

$company_slashed = str_replace("'","",$ci['ORG'][0]['value'][0][0]);
$company_slashed = str_replace('"','',$company_slashed);
$company_check = mysql_query("SELECT * FROM companies WHERE `company_name` = '".$company_slashed."' LIMIT 1") or die(mysql_error());

if(!mysql_num_rows($company_check)){
mysql_query("INSERT INTO `companies` (`company_name`) VALUES ('".$company_slashed."')") or die(mysql_error());
}


I realize there is probably a better way to do this so any advice would be much appreciated...

Karen
13-01-06, 11:07 AM
Please let me know if there is a better way to fix this problem or a more appropriate area to post this sort of information. I am after all I am less than a few days old on this dotproject thing.

Might be worth checking / posting on http://bugs.dotproject.net rather than here - that way it'll be tracked properly by the devteam.

Search first to make sure it's not an already closed report.

Other than that, if you have a login on www.dotproject.net - use the Bugs & Suggestions link from the menu there and you're login/password will automatically be carried into the Mantis package we use for tracking bugs and feature requests.