Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Linux, Apache, MySQL, PHP
  4. how to add date while importing data in csv from mysql query

how to add date while importing data in csv from mysql query

Scheduled Pinned Locked Moved Linux, Apache, MySQL, PHP
databasemysqltutorial
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    him_mca
    wrote on last edited by
    #1

    need to add date in the file name into outfile caluse below please suggest

    SET @outpath = "/var/lib/mysql-files/";
    SET @outfile = (SELECT NOW());
    SET @outextension = "_StepCount.csv";
    SET @SQL := CONCAT("Select Concat(ifnull(First_Name,'')," ",ifnull(Middle_Name,'')," ",ifnull(Last_name,'')) AS Name, u.email from users",@outpath,@outfile,@outextension ) ;
    PREPARE stmt FROM @SQL;
    EXECUTE stmt;
    DEALLOCATE PREPARE stmt;

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups