This topic is locked

Events

3/9/2006 9:53:45 PM
PHPRunner General questions
R
renegadekn author

I have a field called userid.

I have two other fields called Agency and ID (self incrementing)

The userid needs to be a combination of the two fields (AgencyID)

Can you give me an example of how to implement this?
Thanks,
-Rob

Sergey Kornilov admin 3/13/2006

Rob,
you can modify SQL query to concatenate two fields into one. Use concat function in MySQL for this purpose.

select ...,

concat(Agency, ' ', ID) as userid

from ...
R
renegadekn author 3/13/2006

Rob,

you can modify SQL query to concatenate two fields into one. Use concat function in MySQL for this purpose.

select ...,

concat(Agency, ' ', ID) as userid

from ...


Thanks,
I'll give this a try