Category : sql

What is wrong with this code? SELECT DISTINCT `postac`.`nazwa_postac` as ‘Nazwa postaci’, `klasa`.`nazwa_klasaPostac` as ‘Klasa postaci’, `postac`.`poziom_postac` as ‘Poziom postaci’, `przedmiot`.`nazwa_przedmiot` as ‘Przedmiot w lewej rece’, `przedmiot`.`nazwa_przedmiot` as ‘Przedmiot w prawej rece’, `region`.`region_nazwa` as ‘Region postaci’, `postac`.`gracz_postac` as ‘Postac gracza’ FROM `postac`, `klasa`, `gracz`, `region`, `przedmiot` WHERE `postac`.`klasa_postac` = `klasa`.`id_klasaPostac` ^ code: https://i.stack.imgur.com/9wg8h.png ^ mostly ..

Read more

I have an insert query in MySQL and using PHP 7.3, it gives this error: Error: INSERT INTO ‘registered-drivers'(full-name,contact-no,email,profile-type,profile,cf-type,cnic-front, cb-type,cnic-back,license-type, license, reg-type, reg, car, select-city, model, car-type, car-image) VALUES (,,,,,, ,, ,, ,, ,,,,, ) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the ..

Read more

I need some help with my hasManyThrough relationship I have 3 tables: Field Table id Submission Field Table id field_id Submission Field Values Table id submission_field_id and I’m trying to get all the SubmissionFieldValue for the Field through SubmissionField with this: public function FieldValues() { return $this->hasManyThrough(SubmissionFieldValues::class, SubmissionField::class, ‘id’, ‘submission_field_id’, ‘id’, ‘form_field_id’); } So my ..

Read more