Add alphabetical order to database
This commit is contained in:
parent
c07ae23f8a
commit
0811dbde08
|
@ -105,7 +105,7 @@ VALUES ($new_id, ?, ?, ?, ?, ?, ?)";
|
||||||
'description' => $this->parseReferences(strip_tags($result['description']), $result['id']),
|
'description' => $this->parseReferences(strip_tags($result['description']), $result['id']),
|
||||||
'createdBy' => $result['public_name'],
|
'createdBy' => $result['public_name'],
|
||||||
'partsOfSpeech' => explode(',', $partsOfSpeech),
|
'partsOfSpeech' => explode(',', $partsOfSpeech),
|
||||||
'alphabeticalOrder' => array(),
|
'alphabeticalOrder' => $result['alphabetical_order'] !== '' ? explode(' ', $result['alphabetical_order']) : array(),
|
||||||
'details' => array(
|
'details' => array(
|
||||||
'phonology' => array(
|
'phonology' => array(
|
||||||
'consonants' => $result['consonants'] !== '' ? explode(' ', $result['consonants']) : array(),
|
'consonants' => $result['consonants'] !== '' ? explode(' ', $result['consonants']) : array(),
|
||||||
|
@ -284,7 +284,7 @@ VALUES ($new_id, ?, ?, ?, ?, ?, ?)";
|
||||||
'specification' => $result['specification'],
|
'specification' => $result['specification'],
|
||||||
'description' => $result['description'],
|
'description' => $result['description'],
|
||||||
'partsOfSpeech' => explode(',', $partsOfSpeech),
|
'partsOfSpeech' => explode(',', $partsOfSpeech),
|
||||||
'alphabeticalOrder' => array(),
|
'alphabeticalOrder' => $result['alphabetical_order'] !== '' ? explode(' ', $result['alphabetical_order']) : array(),
|
||||||
'details' => array(
|
'details' => array(
|
||||||
'phonology' => array(
|
'phonology' => array(
|
||||||
'consonants' => $result['consonants'] !== '' ? explode(' ', $result['consonants']) : array(),
|
'consonants' => $result['consonants'] !== '' ? explode(' ', $result['consonants']) : array(),
|
||||||
|
@ -355,6 +355,7 @@ WHERE user=$user AND id=$dictionary";
|
||||||
$linguistics = $dictionary_object['details'];
|
$linguistics = $dictionary_object['details'];
|
||||||
$query2 = "UPDATE dictionary_linguistics
|
$query2 = "UPDATE dictionary_linguistics
|
||||||
SET parts_of_speech=:parts_of_speech,
|
SET parts_of_speech=:parts_of_speech,
|
||||||
|
alphabetical_order=:alphabetical_order,
|
||||||
consonants=:consonants,
|
consonants=:consonants,
|
||||||
vowels=:vowels,
|
vowels=:vowels,
|
||||||
blends=:blends,
|
blends=:blends,
|
||||||
|
@ -371,6 +372,7 @@ WHERE dictionary=$dictionary";
|
||||||
// $result2 = $this->db->query($query2, array(
|
// $result2 = $this->db->query($query2, array(
|
||||||
$result2 = $this->db->execute($query2, array(
|
$result2 = $this->db->execute($query2, array(
|
||||||
':parts_of_speech' => implode(',', $dictionary_object['partsOfSpeech']),
|
':parts_of_speech' => implode(',', $dictionary_object['partsOfSpeech']),
|
||||||
|
':alphabetical_order' => implode(' ', $dictionary_object['alphabeticalOrder']),
|
||||||
':consonants' => implode(' ', $linguistics['phonology']['consonants']),
|
':consonants' => implode(' ', $linguistics['phonology']['consonants']),
|
||||||
':vowels' => implode(' ', $linguistics['phonology']['vowels']),
|
':vowels' => implode(' ', $linguistics['phonology']['vowels']),
|
||||||
':blends' => implode(' ', $linguistics['phonology']['blends']),
|
':blends' => implode(' ', $linguistics['phonology']['blends']),
|
||||||
|
|
|
@ -35,6 +35,7 @@ DELIMITER ;
|
||||||
CREATE TABLE IF NOT EXISTS `dictionary_linguistics` (
|
CREATE TABLE IF NOT EXISTS `dictionary_linguistics` (
|
||||||
`dictionary` int(11) NOT NULL,
|
`dictionary` int(11) NOT NULL,
|
||||||
`parts_of_speech` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'Comma-separated',
|
`parts_of_speech` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'Comma-separated',
|
||||||
|
`alphabetical_order` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Space-separated',
|
||||||
`consonants` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Space-separated',
|
`consonants` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Space-separated',
|
||||||
`vowels` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Space-separated',
|
`vowels` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Space-separated',
|
||||||
`blends` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Space-separated',
|
`blends` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'Space-separated',
|
||||||
|
|
Loading…
Reference in New Issue