# |
Jul 2nd 2017, 02:17 |
savant |
you cant do it from the view |
# |
Jul 2nd 2017, 02:17 |
ra7bi |
Yep how i can change the fields from the view |
# |
Jul 2nd 2017, 02:17 |
savant |
but you can change the find fields to `id`, `eng_name` if you wish |
# |
Jul 2nd 2017, 02:16 |
savant |
by default we pull the primaryKey and the displayField |
# |
Jul 2nd 2017, 02:16 |
savant |
you can change the fields if you wish |
# |
Jul 2nd 2017, 02:16 |
ra7bi |
name for Arabic |
# |
Jul 2nd 2017, 02:16 |
ra7bi |
eng_name is for english language |
# |
Jul 2nd 2017, 02:16 |
savant |
change the Diseases->find(‘list’) to add conditions |
# |
Jul 2nd 2017, 02:16 |
ra7bi |
in diseases i'v name and eng_name |
# |
Jul 2nd 2017, 02:15 |
ra7bi |
``` echo $this->Form->input('diseases._ids', ['options' => $diseases]); ``` can i specify which column from diseases array should display ? |
# |
Jul 2nd 2017, 02:14 |
savant |
hi |
# |
Jul 2nd 2017, 02:14 |
ra7bi |
Hey |
# |
Jul 2nd 2017, 00:44 |
savant |
cool |
# |
Jul 2nd 2017, 00:43 |
spencdev |
yeah, definitely! thanks! |
# |
Jul 2nd 2017, 00:43 |
savant |
does that make sense? |
# |
Jul 2nd 2017, 00:43 |
savant |
:slightly_smiling_face: |
# |
Jul 2nd 2017, 00:43 |
savant |
so its like mixing null and string |
# |
Jul 2nd 2017, 00:43 |
savant |
even if you set a default collation for the table |
# |
Jul 2nd 2017, 00:43 |
spencdev |
oooooh! |
# |
Jul 2nd 2017, 00:43 |
savant |
numeric types have no collation |
# |
Jul 2nd 2017, 00:42 |
savant |
you’re not getting it |
# |
Jul 2nd 2017, 00:42 |
savant |
well no |
# |
Jul 2nd 2017, 00:42 |
spencdev |
Ahh okay, i knew about the collations, but all the columns are set to the same collation. I guess i'll go with a numerical check for int columns and string for string columns |
# |
Jul 2nd 2017, 00:41 |
savant |
for the columns you are searching |
# |
Jul 2nd 2017, 00:41 |
savant |
and you cant mix collations |
# |
Jul 2nd 2017, 00:41 |
savant |
you cant mix column types |
# |
Jul 2nd 2017, 00:41 |
spencdev |
@savant |
# |
Jul 2nd 2017, 00:40 |
spencdev |
but when I do that, I always get `Error: SQLSTATE[HY000]: General error: 1271 Illegal mix of collations for operation 'match'` and it only seems to happen if I'm using the integer type columns |
# |
Jul 2nd 2017, 00:40 |
spencdev |
Well, I'm attempting to make a search that can be done with using the id, name, or other integers and string column types |
# |
Jul 2nd 2017, 00:01 |
savant |
@spencdev ^ |
# |
Jul 2nd 2017, 00:01 |
savant |
string is fine but you need to specify a fulltext index |
# |
Jul 2nd 2017, 00:00 |
savant |
because it really only holds one value |
# |
Jul 2nd 2017, 00:00 |
savant |
that doesnt really make sense for an integer |
# |
Jul 1st 2017, 21:25 |
spencdev |
Not really a cakephp question, but can you not full text search a string and int column? |
# |
Jul 1st 2017, 20:53 |
saeideng |
you can put it everywhere that you want :$ |
# |
Jul 1st 2017, 20:53 |
saeideng |
no |
# |
Jul 1st 2017, 20:53 |
saeideng |
yes |
# |
Jul 1st 2017, 20:40 |
adriencs |
where I can put a trait for my components ? |
# |
Jul 1st 2017, 20:00 |
saeideng |
hello |
# |
Jul 1st 2017, 19:58 |
hello11111 |
hello |
# |
Jul 1st 2017, 19:47 |
saeideng |
but i need access to admin area by other url like site.com/admin123 |