Jump to content

PHPmyEdit and Concat


Topshed

Recommended Posts

I am having trouble understanding the Docs for the Platon software so here goes

I have succesfully created usable databases with many bells and whistles including, Add, Change, Delete, List ect.

but in some of my scripts generated by Phpmyedit I want to change the way the result is displayed.

below are two of the fields generated by Phpmyedit

// 'lne_pre'  needs to have a NULL or a 0
$opts['fdd']['lne_pre'] = array(
  'name'     => 'Prefx',
  'select'   => 'N',
  'maxlen'   => 1,
  'sort'     => true
);
// 'other_no'  can have any number from 1 to 99999
$opts['fdd']['other_no'] = array(
  'name'     => 'LNER #',
  'select'   => 'N',
  'maxlen'   => 10,
  'sort'     => true
);
//I need to join them with either...
[code]  $opts['fdd']['lne_pre']['sql'] = 'CONCAT lne_pre, "", other_no)'
//or
$opts['fdd']['other_no']['sql'] = 'CONCAT lne_pre, "", other_no)'

 

My problem is I do not know how or where the pieces fit. I have tried many variations see below but I cannot get it right....

Do I need both fields as generated with the CONCAT statement ?, is the order in which they are coded important  ?.

$opts['fdd']['lne_pre'] = array(
  'name'     => 'Prefx',
  'select'   => 'N',
  'maxlen'   => 1,
  'sort'     => true
);
$opts['fdd']['other_no'] = array(
  'name'     => 'LNER #',
  'select'   => 'N',
  'maxlen'   => 10,
  'sort'     => true
);
$opts['fdd']['lne_pre']['sql'] = 'CONCAT lne_pre, "", other_no)''

 

PLEASE someone help me out 

Regards  Topshed

 

 

Link to comment
https://forums.phpfreaks.com/topic/169618-phpmyedit-and-concat/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.