- Posts: 27
- Thank you received: 1
//Ajout pour enregistrement du cv dans jos_js_job_minicv
$db->setQuery(\"SELECT application_title, iamavailable, date_start, job_category, jobsalaryrange,jobtype,employer,employer_position, employer_to_date, employer_leave_reason,heighestfinisheducation,total_experience,license_country,create_date FROM jos_js_job_resume WHERE uid = $uid\");
$minicv = $db->loadObject() or die(\'Erreur SQL recup jos_js_job_resume<br>\'.$query.\'<br>\'.mysql_error());
//$id_candidat = $minicv->uid;
//$profil_candidat = $minicv->application_title;
$disponibilite_candidat = $minicv->iamavailable;
$date_disponibilite_candidat = $minicv->date_start;
$secteur_candidat = $minicv->job_category;
$type_contrat_candidat = $minicv->jobtype;
$dernier_employeur_candidat = $minicv->employer;
$dernier_poste_candidat = $minicv->employer_position;
$date_fin_contrat_candidat = $minicv->employer_to_date;
$raison_fin_contrat_candidat = $minicv->employer_leave_reason;
$etudes_candidat = $minicv->heighestfinisheducation;
$experience_candidat = $minicv->total_experience;
$mobilite_candidat = $minicv->license_country;
$time_date = $minicv->create_date;
echo $time_date;
echo \'<br/>\';
echo $profil_candidat;
echo \'<br/>\';
echo $disponibilite_candidat;
echo \'<br/>\';
echo $date_disponibilite_candidat;
echo \'<br/>\';
echo $secteur_candidat;
echo \'<br/>\';
echo $type_contrat_candidat;
echo \'<br/>\';
echo $etudes_candidat;
echo \'<br/>\';
echo $dernier_employeur_candidat;
echo \'<br/>\';
echo $dernier_poste_candidat;
echo \'<br/>\';
echo $date_fin_contrat_candidat;
echo \'<br/>\';
echo $raison_fin_contrat_candidat;
echo \'<br/>\';
echo $experience_candidat;
echo \'<br/>\';
echo $mobilite_candidat;
echo \'<br/>\';
echo $id_candidat;
//recuperation du secteur activite
$query = \"SELECT cat_title FROM jos_js_job_categories WHERE id=$secteur_candidat\";
$db->setQuery ($query);
//$db->setQuery(\"SELECT cat_title FROM jos_js_job_categories WHERE id=$secteur_candidat\");
$activite_candidat = $db->loadResult() or die(\'Erreur SQL recup secteur activite<br>\'.$query.\'<br>\'.mysql_error());
//recuperation du type contrat
$query = \"SELECT title FROM jos_js_job_jobtypes WHERE id=$type_contrat_candidat\";
$db->setQuery ($query);
//$db->setQuery(\"SELECT title FROM jos_js_job_jobtypes WHERE id=$type_contrat_candidat\");
$contrat_candidat = $db->loadResult() or die(\'Erreur SQL type contrat!<br>\'.$query.\'<br>\'.mysql_error());
//recuperation du niveau etudes
$query = \"SELECT title FROM jos_js_job_heighesteducation WHERE id=$etudes_candidat\";
$db->setQuery ($query);
//$db->setQuery(\"SELECT title FROM jos_js_job_heighesteducation WHERE id=$etudes_candidat\");
$niveau_etudes_candidat = $db->loadResult() or die(\'Erreur SQL niveau etudes!<br>\'.$query.\'<br>\'.mysql_error());
//recuperation de experience totale
$query = \"SELECT title FROM jos_js_job_experience WHERE id=$experience_candidat\";
$db->setQuery ($query);
//$db->setQuery(\"SELECT title FROM jos_js_job_experience WHERE id=$experience_candidat\");
$total_experience_candidat = $db->loadResult() or die(\'Erreur SQL total experience!<br>\'.$query.\'<br>\'.mysql_error());
echo $activite_candidat;
echo \'<br/>\';
echo $contrat_candidat;
echo \'<br/>\';
echo $niveau_etudes_candidat;
echo \'<br/>\';
echo $total_experience_candidat;
echo \'<br/>\';
//insertion des donnees dans la table jos_js_job_minicv
$query = \"INSERT INTO jos_js_job_minicv (time_date, profil_candidat, disponibilite_candidat, date_disponibilite_candidat, secteur_candidat, type_contrat_candidat, niveau_etudes_candidat, dernier_employeur_candidat, dernier_poste_candidat, date_fin_contrat_candidat, raison_fin_contrat_candidat, experience_candidat, mobilite_candidat, id_candidat) VALUES (\'$time_date\', \'$profil_candidat\', \'$disponibilite_candidat\', \'$date_disponibilite_candidat\', \'$activite_candidat\', \'$contrat_candidat\', \'$niveau_etudes_candidat\', \'$dernier_employeur_candidat\', \'$dernier_poste_candidat\', \'$date_fin_contrat_candidat\', \'$raison_fin_contrat_candidat\', \'$total_experience_candidat\', \'$mobilite_candidat\', \'$id_candidat\')\";
$db->setQuery ($query);
//$db->setQuery(\"INSERT INTO jos_js_job_minicv (time_date, profil_candidat, disponibilite_candidat, date_disponibilite_candidat, secteur_candidat, type_contrat_candidat, niveau_etudes_candidat, dernier_employeur_candidat, dernier_poste_candidat, date_fin_contrat_candidat, raison_fin_contrat_candidat, experience_candidat, mobilite_candidat, id_candidat) VALUES (\'$time_date\', \'$profil_candidat\', \'$disponibilite_candidat\', \'$date_disponibilite_candidat\', \'$activite_candidat\', \'$contrat_candidat\', \'$niveau_etudes_candidat\', \'$dernier_employeur_candidat\', \'$dernier_poste_candidat\', \'$date_fin_contrat_candidat\', \'$raison_fin_contrat_candidat\', \'$total_experience_candidat\', \'$mobilite_candidat\', \'$id_candidat\')\");
$db->query() or die(\'Erreur SQL jos_js_job_minicv!<br>\'.$query.\'<br>\'.mysql_error());
//Fin ajout
$db->setQuery(\"SELECT application_title, iamavailable, date_start, job_category, jobsalaryrange,jobtype,employer,employer_position, employer_to_date, employer_leave_reason,heighestfinisheducation,total_experience,license_country,create_date FROM jos_js_job_resume WHERE uid = $uid\");
Fatal error: Call to a member function setQuery() on a non-object in C:\\wamp\\www\\Joomla_1.5.15-FR\\components\\com_jsjobs\\models\\jsjobs.php on line 2703
$db =& JFactory::getDBO();
$resumequery = \"SELECT * FROM \".$db->nameQuote(\'#__js_job_resume\') .\" WHERE uid = \".$uid;
$db->setQuery( $resumequery );
$resume = $db->loadObject();
if ( isset($resume) ){
echo $resume->title;
}