# |
Jul 22nd 2017, 12:35 |
admad |
Guest68527: https://book.cakephp.org/3.0/en/orm/retrieving-data-and-resultsets.html#filtering-by-associated-data |
# |
Jul 22nd 2017, 12:32 |
Guest68527 |
admad, can you plz help me |
# |
Jul 22nd 2017, 12:28 |
itamer |
The other thing people will enter is "Sarah Smith and John Doe" which may actually be a match for another field (but not this one) |
# |
Jul 22nd 2017, 12:28 |
admad |
https://book.cakephp.org/3.0/en/orm/query-builder.html#using-sql-functions |
# |
Jul 22nd 2017, 12:27 |
itamer |
I'll go back to that if I have to |
# |
Jul 22nd 2017, 12:27 |
itamer |
It's a quick and easy form for people to enter but I've wanted to avoid having to work out if "Sarah de Smith" or "Sarah van Smith" or "Sarah Jane Smith" has been entered - the concat worked just fine before but we've upgraded. |
# |
Jul 22nd 2017, 12:25 |
admad |
@itamer why concat instead of just using firstname => 'Sarah' and 'lastname' => 'Smith' in conditions? |
# |
Jul 22nd 2017, 12:21 |
itamer |
I want to add this to my $conds array and pass it into the query 'CONCAT(Individuals.firstname,' ',Individuals.lastname)' => 'Sarah Smith' but when it gets parsed into the query it comes out as CONCAT(Individuals.firstname,' ',individuals.lastname) :c1 and fails because there is no operator between the concat statement and the variable I'm guessing it's the concat that throws it out. Any workarounds? |
# |
Jul 22nd 2017, 12:05 |
Guest68527 |
For example two tables are courses, sessions are related by courses_sessions, and courses_sessions belongs to mediums table |
# |
Jul 22nd 2017, 12:03 |
sonu_nk |
hmic, is AppController.php -> intilize() is not right place to it ? i dont have any knowledge about middleware...why to use and how to use... |
# |
Jul 22nd 2017, 12:03 |
Guest68527 |
How query and all other thing work in this case |
# |
Jul 22nd 2017, 12:03 |
Guest68527 |
Is it possible to use A belongs to many B By table AB and AB belongs to many C |
# |
Jul 22nd 2017, 12:01 |
hmic |
you could have a middleware too |
# |
Jul 22nd 2017, 12:00 |
sonu_nk |
i want to call a common method automatically on each request, AppController.php is the right place ? and should call that method in initialize() ??? right? |
# |
Jul 22nd 2017, 11:59 |
Guest68527 |
Hello |
# |
Jul 22nd 2017, 11:51 |
Guest68527 |
SomeOne expert here who can help me? |
# |
Jul 22nd 2017, 11:43 |
ksandeep |
anyone is online |
# |
Jul 22nd 2017, 11:43 |
ksandeep |
plz help how to setup |
# |
Jul 22nd 2017, 11:43 |
ksandeep |
all have belong to many relation |
# |
Jul 22nd 2017, 11:43 |
ksandeep |
so again relation is with courses_seesions table with mediums table |
# |
Jul 22nd 2017, 11:42 |
ksandeep |
Now at same time i have to store data like medium where one course available in multiple lang. |
# |
Jul 22nd 2017, 11:41 |
ksandeep |
I have two table course and session. Then have table courses_sessions which take data for course which change session to session |
# |
Jul 22nd 2017, 11:40 |
ksandeep |
I need help in table setup. how to give relation plz help |
# |
Jul 22nd 2017, 11:39 |
ksandeep |
Hi All |
# |
Jul 22nd 2017, 10:31 |
crazycoder |
thanks |
# |
Jul 22nd 2017, 10:31 |
crazycoder |
ok i will use a foreach() |
# |
Jul 22nd 2017, 10:30 |
birdy247 |
It currently not happening |
# |
Jul 22nd 2017, 10:30 |
crazycoder |
can i exit a loop inside collection->each() ? |
# |
Jul 22nd 2017, 10:30 |
crazycoder |
hello |
# |
Jul 22nd 2017, 10:27 |
birdy247 |
should I expect table object to be called in the through model? |
# |
Jul 22nd 2017, 10:27 |
birdy247 |
If I am saving a belongsToMany with the "through" option |
# |
Jul 22nd 2017, 10:04 |
r3zam |
slackebot: exactly what i needed (yea , it was address of uploaded image but i didn't know how to make to start from webroot directory) |
# |
Jul 22nd 2017, 09:15 |
littleylv |
if $carCompany->logo is something like uploads/files/foo.jpg , try `$this->Html->image($carCompany->logo, ['pathPrefix' => '/']);` |
# |
Jul 22nd 2017, 09:12 |
littleylv |
what’s in `$carCompany->logo` |
# |
Jul 22nd 2017, 09:10 |
widelec-BB |
r3zam: In 3.x you have UrlHelper. |
# |
Jul 22nd 2017, 09:09 |
widelec-BB |
uch, 3.x. sorry, I somehow assumed you are using 2.x... |
# |
Jul 22nd 2017, 09:08 |
r3zam |
widelec-BB: i couldn't find assetUrl in cakephp 3.x document |
# |
Jul 22nd 2017, 09:04 |
r3zam |
widelec-BB: let me check it |
# |
Jul 22nd 2017, 09:02 |
widelec-BB |
r3zam: maybe try using HtmlHelper::assetUrl() |
# |
Jul 22nd 2017, 08:42 |
r3zam |
hey guys , i uploaded some images to webroot/uploads/files , but when i try to load them with this syntax i got 404 error (<img src="/<?=$carCompany->logo; ?>" alt="<?=$carCompany->name . '\'s Logo'; ?>) i can't use image helper too , how can i show them with relative path ? |
# |
Jul 22nd 2017, 07:49 |
birdy247 |
Morning guys |