stevepiercy
grid with join? –
Is it possible to display a knop_grid as the result of a JOIN
between two or more tables?
--steve
-- -- -- -- -- -- -- -- -- -- -- -- -- -...
Loading...
Johan Solve-2
Yes, any kind of search result with a knop database search.
Which reminds me that I had begun work with adding support for other kinds of data ...
Loading...
stevepiercy
I must be missing something.
var('list')=knop_grid(
-database=$d,
-nav=$nav,
-quicksearch=$lang_ui -> sea...
Loading...
Jolle Carlestam-4
You can't pass in a records_array. Yet. That's what Johan referred to that he was working on.
But you can have the DB object perform an SQL searc...
Loading...
stevepiercy
Sure, but how can you use that within a grid object? That's
where I'm stumped.
I have a temporary workaround where I use a named inline and ...
Loading...
Jolle Carlestam-4
2 mar 2010 kl. 10.57 skrev Steve Piercy - Web Site Builder:
> Sure, but how can you use that within a grid object? That's where I'm stumped...
Loading...
stevepiercy
On 3/2/10 at 11:20 AM, list@... (Jolle Carlestam) pronounced:
>#sql += ' WHERE /* Any static search params you want here */';
>
>if(...
Loading...
Johan Solve-2
At 21.24 -0800 2010-03-01, Steve Piercy - Web Site Builder wrote:
>Unfortunately $list->quicksearch(-sql) does not properly quote the field...
Loading...
Johan Solve-2
At 09.13 +0100 2010-03-02, Johan Solve wrote:
>At 21.24 -0800 2010-03-01, Steve Piercy - Web Site Builder wrote:
> >Unfortunately $list...
Loading...
Jolle Carlestam-4
3 mar 2010 kl. 10.26 skrev Johan Solve:
> At 09.13 +0100 2010-03-02, Johan Solve wrote:
>> At 21.24 -0800 2010-03-01, Steve Piercy - ...
Loading...
stevepiercy
On 3/3/10 at 10:49 AM, list@... (Jolle Carlestam) pronounced:
>3 mar 2010 kl. 10.26 skrev Johan Solve:
>
>>At 09.13 +0100 2010-03...
Loading...
Johan Solve-2
Fwiw, if you want to fix this pronto you can modify the knop_stripbackticks in util.inc, or override it with your own version. It's a plain ctag.
...
Loading...
stevepiercy
That appears to truncate a string at the first backtick, not
replace "." with "`.`".
Nonetheless that gives me a lead int...
Loading...
Johan Solve-2
At 18.45 -0800 2010-03-03, Steve Piercy - Web Site Builder wrote:
>That appears to truncate a string at the first backtick, not replace "...
Loading...
stevepiercy
On 3/4/10 at 8:21 AM, inbox_js@... (Johan Solve) pronounced:
>At 18.45 -0800 2010-03-03, Steve Piercy - Web Site Builder wrote:
>>Tha...
Loading...
Jolle Carlestam-4
I think you need to use -template here.
$list -> addfield(
-label='Block Name',
-dbfield='b.name',
-url='admin/blocks/edit',
-na...
Loading...
stevepiercy
Re: grid with join? [solved] –
Attached are the files to get JOINs to work with Knop.
Following are code samples to use.
-----------------------------------------
cfg
--...
Loading...
stevepiercy
Dude. That did the trick. Thank you!
Gimme a couple of minutes to collect the Knop files and code
samples and send them out.
--steve
...
Loading...
stevepiercy
On 3/6/10 at 7:17 PM, Web@... (Steve Piercy - Web
Site Builder) pronounced:
>On 3/4/10 at 8:21 AM, inbox_js@... (Johan Solve) pronounced:
...
Loading...
Jolle Carlestam-4
4 mar 2010 kl. 12.45 skrev Steve Piercy - Web Site Builder:
> Now the trick would be how to replace string_replace with a custom tag that al...
Loading...
Jolle Carlestam-4
Today I only have this issue in one place and I already have a fix in place there.
So I'm not in need of a quick fix.
Better that we agree on ...
Loading...
stevepiercy
Huh? The default in my proposal is aligned with what you want.
The only difference between what you want and my proposal is to
add an option...
Loading...
Brian K. Middendorf
On Mar 2, 2010, at 4:26 PM, Johan Solve wrote:
> Ok, not a good idea to have periods in field names but it is allowed.
What about two spa...
Loading...
Jolle Carlestam-4
3 mar 2010 kl. 11.42 skrev Brian K. Middendorf:
> On Mar 2, 2010, at 4:26 PM, Johan Solve wrote:
>
>> Ok, not a good idea to hav...
Loading...
Brian K. Middendorf
On Mar 2, 2010, at 5:48 PM, Jolle Carlestam wrote:
> Is spaces allowed in field names for Mysql?
> The join and back-tic issue only come...
Loading...
Jolle Carlestam-4
2 mar 2010 kl. 15.24 skrev Steve Piercy - Web Site Builder:
> On 3/2/10 at 11:20 AM, list@... (Jolle Carlestam) pronounced:
>
>>...
Loading...
stevepiercy
On 3/2/10 at 3:46 PM, list@... (Jolle Carlestam) pronounced:
>2 mar 2010 kl. 15.24 skrev Steve Piercy - Web Site Builder:
>
>>On ...
Loading...
Jolle Carlestam-4
I did not indicate where to put the different parts. Sorry for that.
The first was from my config the middle from my lib and the last part from...
Loading...
stevepiercy
OK, so basically follow use this flow:
(1) create a db object $d
(2) create a grid object $l using $d
(3) perform a query on $d
(4) rend...
Loading...
Johan Solve-2
At 18.04 -0800 2010-03-01, Steve Piercy - Web Site Builder wrote:
>OK, so basically follow use this flow:
>
>(1) create a db object $...
Loading...
Jolle Carlestam-4
2 mar 2010 kl. 12.04 skrev Steve Piercy - Web Site Builder:
> So what really happens here? At the moment it appears to be magic to me. Can...
Loading...
stevepiercy
On 3/2/10 at 12:11 PM, list@... (Jolle Carlestam) pronounced:
>2 mar 2010 kl. 12.04 skrev Steve Piercy - Web Site Builder:
>
>>So...
Loading...
Johan Solve-2
At 11.20 +1000 2010-03-02, Jolle Carlestam wrote:
>2 mar 2010 kl. 10.57 skrev Steve Piercy - Web Site Builder:
>
>> Sure, but how c...
Loading...
stevepiercy
On 3/1/10 at 9:24 PM, Web@... (Steve Piercy - Web
Site Builder) pronounced:
>On 3/2/10 at 11:20 AM, list@... (Jolle Carlestam) pronounced:...
Loading...
stevepiercy
One minor correction to the SQL:
lib
----------------------------
var('sql') = string;
$sql = "
select
blocks.id as id,
bl...