Need help exporting csv

Everything related to Hesk - helpdesk software

Moderator: mkoch227

Post Reply
danonee
Posts: 11
Joined: Sun Oct 21, 2012 9:05 am

Need help exporting csv

Post by danonee »

hallo i need to export my database now there is a problem i have added a custom field and i wanted to add it in the sql query i have no idea how can i do it

(its custom2) btw

can someone help ? this is my sql query copied from a post here .

SELECT `hesk_tickets`.`id` AS "Ticket Number", `hesk_tickets`.`dt` AS "Date Created", `hesk_users`.`name` AS Owner, `hesk_categories`.`name` AS Category, `hesk_tickets`.`name` AS "Contact", `hesk_tickets`.`subject` AS Subject, `hesk_status`.`name` AS "Status", `hesk_priority`.`name` AS Priority, `hesk_tickets`.`time_worked` As "Time Worked"

FROM hesk_tickets, hesk_categories, hesk_users, hesk_status, hesk_priority

WHERE (

hesk_categories.id = hesk_tickets.category

AND hesk_users.id = hesk_tickets.owner

AND hesk_status.id = hesk_tickets.status

AND hesk_priority.id = hesk_tickets.priority

)-

thx for help in advantage
Klemen
Site Admin
Posts: 10136
Joined: Fri Feb 11, 2005 4:04 pm

Re: Need help exporting csv

Post by Klemen »

Before FROM add something like this to get contents of custom1 field:

, `hesk_tickets`.`custom1` As "Custom 1"
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply