Задавайте вопросы, мы ответим
Вы не зашли.
Страниц: 1
Сейчас пытаюсь вызвать хранимую процедуру из PHP. Получаю ошибку
Как получить данные?
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in Y:\home\localhost\www\index2.php on line 9
Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in Y:\home\localhost\www\index2.php on line 73
<?php //ini_set('display_errors',1); error_reporting(E_ALL ^E_NOTICE); mysql_connect("localhost", "16261_dba", "vova33"); mysql_select_db("variantdialog_99k_db1"); // $query = "SELECT * FROM tCandidates"; $query = "CALL pSelect2()"; $result = mysql_query($query); while ($row = mysql_fetch_assoc($result)) { echo $row["intID"]."<br />"; echo $row["varcharStatus"]."<br />"; echo $row["timestampUpdate"]."<br />"; echo $row["dateProlongation"]."<br />"; echo $row["timestampInsert"]."<br />"; echo $row["intBirthday"]."<br />"; echo $row["intBirthmonth"]."<br />"; echo $row["intBirthyear"]."<br />"; echo $row["varcharName"]."<br />"; echo $row["varcharSecondname"]."<br />"; echo $row["varcharFamilyname"]."<br />"; echo $row["varcharSpousefullname"]."<br />"; echo $row["varcharButler"]."<br />"; echo $row["varcharGardener"]."<br />"; echo $row["varcharNanny"]."<br />"; echo $row["varcharGoverness"]."<br />"; echo $row["varcharCook"]."<br />"; echo $row["varcharHousemaid"]."<br />"; echo $row["varcharLogopedist"]."<br />"; echo $row["varcharTutor"]."<br />"; echo $row["varcharNurse"]."<br />"; echo $row["varcharDriver"]."<br />"; echo $row["varcharCouple"]."<br />"; echo $row["varcharOther "]."<br />"; echo $row["varcharPassportSeries"]."<br />"; echo $row["varcharPassportWhenWho"]."<br />"; echo $row["varcharNationality"]."<br />"; echo $row["varcharPassportExternal"]."<br />"; echo $row["varcharMarriage"]."<br />"; echo $row["intChildren"]."<br />"; echo $row["varcharEducationPedagogicalMiddle"]."<br />"; echo $row["varcharEducationPedagogicalHigherIncomplete"]."<br />"; echo $row["varcharEducationPedagogicalHigher"]."<br />"; echo $row["varcharEducationMedicalMiddle"]."<br />"; echo $row["varcharEducationMedicalHigherIncomplete"]."<br />"; echo $row["varcharEducationMedicalHigher"]."<br />"; echo $row["varcharEducationOther"]."<br />"; echo $row["varcharGraduatedWhatWhen"]."<br />"; echo $row["varcharMethods"]."<br />"; echo $row["varcharLanguageEnglish"]."<br />"; echo $row["varcharLanguageFrench"]."<br />"; echo $row["varcharLanguageGerman"]."<br />"; echo $row["varcharLanguageSpanish"]."<br />"; echo $row["varcharLanguageOther"]."<br />"; echo $row["varcharWorkExperience"]."<br />"; echo $row["varcharWorkTheLast"]."<br />"; echo $row["varcharWorkExperienceInFamily"]."<br />"; echo $row["varcharWorkReferences"]."<br />"; echo $row["intPreferenceMinAge"]."<br />"; echo $row["intPreferenceMaxAge"]."<br />"; echo $row["varcharDrivingExperience"]."<br />"; echo $row["varcharAllergy"]."<br />"; echo $row["varcharPets"]."<br />"; echo $row["varcharHobby"]."<br />"; echo $row["varcharResidence"]."<br />"; echo $row["varcharResidenceOfSpouse"]."<br />"; echo $row["varcharRegistration"]."<br />"; echo $row["varcharWorkType"]."<br />"; echo $row["dateWorkStart"]."<br />"; echo $row["intSalary"]."<br />"; echo $row["varcharSupplements"]."<br />"; echo $row["varcharPicture"]."<br />"; } mysql_free_result($result); ?>
Хранимая процедура рекорд сет возвращает:
Неактивен
PHP не умеет вытаскивать данные из процедур через стандартный коннектор. Используйте mysqli.
Неактивен
А можно маленький рабочий пример? Я пытался через mysqli но что-то не получилось
Неактивен
Неактивен
Страниц: 1