Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 24 14:49
    marcovtwout commented #4385
  • Jun 24 08:50
    c-schmitz commented #4385
  • Jun 24 06:14
    bizley commented #4442
  • Jun 24 06:14
    bizley closed #4442
  • Jun 24 06:14
    bizley closed #4441
  • Jun 23 22:47
    Arhell review_requested #4442
  • Jun 23 22:46
    Arhell ready_for_review #4442
  • Jun 23 22:46
    Arhell synchronize #4442
  • Jun 23 01:18
    Arhell labeled #4442
  • Jun 23 01:18
    Arhell opened #4442
  • Jun 22 18:30
    Arhell assigned #4441
  • Jun 22 18:30
    Arhell opened #4441
  • Jun 10 13:03
    marcovtwout closed #4440
  • Jun 10 13:03
    marcovtwout commented #4440
  • Jun 10 12:50
    KajetanDudczak edited #4440
  • Jun 10 12:48
    KajetanDudczak opened #4440
  • Jun 07 06:06
    bizley commented #4439
  • Jun 07 06:06
    bizley closed #4439
  • Jun 07 06:06
    bizley closed #4438
  • Jun 07 06:06
    bizley labeled #4439
Alex
@Alex-Bond
try this
$query->orderBy([
'id' => SORT_ASC,
'name' => SORT_DESC,
]);
let me check that github link :-)
Alex
@Alex-Bond
$query->orderBy([
'id' => SORT_ASC,
'name' => SORT_DESC,
]);
i copy it from oficial docs
ajithfort
@ajithfort
i tried like this $first_array = Yii::app()->db->createCommand()
->select('*')
->from('form_fields')
->where(array('not in', 'id', $sorted_array))
->andWhere('form_id=:form_id', array(':form_id'=>$form_id))
->orderBy(['id' => SORT_ASC,'name' => SORT_DESC,])
->queryAll();
and i got this error CDbCommand and its behaviors do not have a method or closure named "orderBy".
:worried:
Alex
@Alex-Bond
try just order
ajithfort
@ajithfort
ok its working partially just some command error
CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column '4' in 'order clause'. The SQL statement executed was: SELECT *
FROM form_fields
WHERE (id NOT IN ('3', '1', '6')) AND (form_id=:form_id)
ORDER BY 4, 3
i will make it work hopefully :smile:
Alex
@Alex-Bond
dont tell id of column in order
tell hit full name of columns
him*
ajithfort
@ajithfort
just got my sql query working SELECT * FROM form_fields
WHERE id IN ("3","1","6")
ORDER BY FIELD (id, "3","1","6")
:sparkles:
xicond
@xicond

use ->order() then

$first_array = Yii::app()->db->createCommand()
->select('*')
->from('form_fields')
->where(array('not in', 'id', $sorted_array))
->andWhere('form_id=:form_id', array(':form_id'=>$form_id))
->order(['id' => SORT_ASC,'name' => SORT_DESC,])
->queryAll();

shzaur
@shzaur
This message was deleted
xicond
@xicond
why getPathInfo and createUrl remove ended slash , How to keep it ?
xicond
@xicond
I've got figure it out by urlSuffix
xicond
@xicond
Hello
xicond
@xicond
How to call generator and validator CSRF manually without enable csrf ? I just want to enable for specific action, don't wanna effect the rest of ajax request
Ankit Padia
@InsaneSkull
i want to check row existence in db using CDbCommand. What is the method for that, something like exist() in yii2
Mohamed Cherif Bouchelaghem
@cherifGsoul
@InsaneSkull I dont think something like that already exists, you can make your own method by extending CDbCommand or puting it in your component
Ankit Padia
@InsaneSkull
@cherifGsoul i have already discovered alternative.
Mohamed Cherif Bouchelaghem
@cherifGsoul
@InsaneSkull casting queryScalar to boolean
ok can you share it?
Ankit Padia
@InsaneSkull
i meant not needed to check exist, used queryRow() to solve my problem.
Mohamed Cherif Bouchelaghem
@cherifGsoul
ok
Ankit Padia
@InsaneSkull
I have successfully created cron job, but i want to schedule it using crontab -e but i can't get it working.
Tutorial path:* * * * * php/var/www/html/yii1/ protected/yii makefile/make
My path:* * * * *php /var/www/html/basic/yii make/make
but it's not working, why?
it's yii2 question, but still someone help me with this.
Mohamed Cherif Bouchelaghem
@cherifGsoul
Im not very experienced with this :/
Ankit Padia
@InsaneSkull
@cherifGsoul no problem
:-)
Mohamed Cherif Bouchelaghem
@cherifGsoul
the first make is a command controller?
Ankit Padia
@InsaneSkull
yes
Mohamed Cherif Bouchelaghem
@cherifGsoul
I think pasting the error is more helpful
if you have any
Ankit Padia
@InsaneSkull
no errors, but files are not creating every minute
des1roer
@des1roer
hello
how i can renderpartial from renderpartial ?
1 st
           renderPartial('//../modules/analiz/views/analizCreate/shihta')
and from shihta
             $this->renderPartial('_table'
SiteController не может найти представление "_table"
Nurik
@codder414
Здравствуйте, кто знает как сделать так, чтобы в CgridView одна из колонок была select, в котором необходимо прежде выбрать значение, перед тем, как нажать на кнопку добавить. Как связат две эти колонки в CgriDView ?