Jump to content

ccmd00d

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

ccmd00d's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi all, I am trying to backup my mySQL database using the cron tab in cpanel. This is the following command i am using... mysqldump --user=user --password=temp --quick --add-drop-table --add-locks --extended-insert --lock-tables --all derek_IST | gzip > /home/databackup-`date -I`.gz This command is set to go every 15 min for testing....however i am get the following error in my email. /bin/sh: /home/databackup-2005-11-09.gz: No such file or directory My question is how do i set the directory where to store the file? I dont know what my root we directory is... Thanks, Derek
  2. hi, thanks for the reply...i was able to download into excel using a tutorial on this site..my question is... How can you format the results of the data in excel? here is my code. <?php $select = "SELECT * FROM evaluations WHERE eval_ID='8'"; $export = mysql_query($select); $fields = mysql_num_fields($export); for ($i = 0; $i < $fields; $i++) { $header .= mysql_field_name($export, $i) . "\t"; } while($row = mysql_fetch_row($export)) { $line = ''; foreach($row as $value) { if ((!isset($value)) OR ($value == "")) { $value = "\t"; } else { $value = str_replace('"', '""', $value); $value = '"' . $value . '"' . "\t"; } $line .= $value; } $data .= trim($line)."\n"; } $data = str_replace("\r","",$data); //Download into excel format header("Content-type: application/x-msdownload"); header("Content-Disposition: attachment; filename=extraction.xls"); header("Pragma: no-cache"); header("Expires: 0"); print "$header/n$data"; ?> Thanks Again, Derek
  3. Hi Everyone, I am working on a senior design project, which happens to be an online course evaluation system. One of my requirements to download evaluation data into excel format. Could anyone point me in the right direction on how to do this. I am having no problems retrieving and displaying information, i now just need to convert it. Thanks, Derek
×
×
  • 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.