hi
is there a way to alias this in php class Editor::inst( $db, $TblName ) for example Editor::inst( $db, $TblName as 'tbl') or Editor::inst( $db, $TblName )->name('tbl') or ???
Thank
Bob
I don't quite understand I'm afraid - are you looking to alias the table name? If so try:
Editor::inst( $db, $TblName .' as tbl')
However it isn't something we use extensively, so it is possible there might be a few rough edges.
Allan
hi @allan
Yes it was what I was looking for... I use .data files that describe datas, .def that describe associated table and editor...
With many table in a dataset, fields do have prefix using table name.
So when I want to test a way using a view, the stable name used for tests change, and I need to change fields definition in .def files.
So using alias I can reuse fields definitions with no change at all...
I did test $Table as 'tbl', missing table name must be a string
Sometimes I'm better... and this is not really difficult to be
Thanks Bob
It looks like you're new here. If you want to get involved, click one of these buttons!
Answers
I don't quite understand I'm afraid - are you looking to alias the table name? If so try:
However it isn't something we use extensively, so it is possible there might be a few rough edges.
Allan
hi @allan
Yes it was what I was looking for... I use .data files that describe datas, .def that describe associated table and editor...
With many table in a dataset, fields do have prefix using table name.
So when I want to test a way using a view, the stable name used for tests change, and I need to change fields definition in .def files.
So using alias I can reuse fields definitions with no change at all...
I did test $Table as 'tbl', missing table name must be a string
Sometimes I'm better... and this is not really difficult to be
Thanks
Bob