User Profile

Collapse

Profile Sidebar

Collapse
iru76
iru76
Last Activity: Jan 28 '09, 12:42 AM
Joined: Jan 8 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Hi,

    Currently using LongText. I think that should hold about 4GB of data right?
    See more | Go to post

    Leave a comment:


  • Hi,

    I've tested the script, need a bit of twigging but it is working as intended... but... I hit another snag... when updating the alias table, the group_concat cut off after a certain number of char... which to my dismay, not what i wanted...

    So on a related question, is there anyway to increase the group_concat cache or another way to grip and update the field? (I think i got around 10k emails there)

    ...
    See more | Go to post

    Leave a comment:


  • Thanks!

    Ok. I have tried the SQL command for insert and it sort of work for me. But some fields already have values in it and probably a UPDATE will work better for me in those cases I think.

    So if i were to use the UPDATE command, would it look something like this?
    [code=mysql]
    UPDATE alias
    SET goto = (
    SELECT
    `domain`,
    GROUP_CONCAT(`u sername` ORDER BY `username` DESC SEPARATOR...
    See more | Go to post
    Last edited by Atli; Jan 9 '09, 01:31 AM. Reason: Added [code] tags

    Leave a comment:


  • Ah ok. Understand.

    If possible, I belief I will need the data to be written to an actual table call 'alias' into an actual row 'goto', as the program (postfix) are relatively hard coded and I don't have the ability to change the codes in it.

    I do know that the general practice is to use view for select and display, but in this case, as the table is also used by other parts of the program which require the same format...
    See more | Go to post

    Leave a comment:


  • So in this case, if i use the example for my DB:

    [code=mysql]
    CREATE VIEW `nameListView` AS
    SELECT domain,
    GROUP_CONCAT(us ername ORDER BY username ASC SEPARATOR ',')
    FROM mailbox
    GROUP BY domain[/code]

    followed by:
    [code=mysql]
    UPDATE alias
    SET goto = nameListView[/code]

    Will that update the goto column in the alias table with the data?
    See more | Go to post
    Last edited by Atli; Jan 8 '09, 07:38 PM. Reason: Added [code] tags

    Leave a comment:


  • Hi,

    Perhaps a more detail description of the issue i'm facing will help everyone understand why I'm trying to do it. :)

    I have a Postfix server which is dependent on the MySQL database backend. However, to create a mass mailing list that is auto updated, I am trying to write a sql script to grip the data from the the mailbox table and update the alias table sorted by domain.

    As i have tried to do so from...
    See more | Go to post

    Leave a comment:


  • Hi Atli,

    Thanks for the reply. I do understand the basic principle behind database design, however, in this case, the software I am using required that the data be combined into a single row in a single column for it to function, thus the question on how to do it... :)

    I've so far been able to work out how to use GROUP_CONCAT, but unfortunately, how to tie in updating the table's column and row with the new data is still...
    See more | Go to post

    Leave a comment:


  • Select Multiple Rows and Combine / Insert into One Row

    Hi All,

    I am attempting to merge something like this in my MySQL database:

    Name | Dept
    =========
    John Account
    Wayne Account
    James Management
    Bond Management

    into something like this:

    Name | Dept
    =========
    John,Wayne Account
    James,Bond Management

    So far, I have found that by running the MySQL Script:
    [code=mysql]
    SELECT dept,...
    See more | Go to post
    Last edited by Atli; Jan 8 '09, 06:32 AM. Reason: Added [code] tags
No activity results to display
Show More
Working...