@jpadie- I tried the first one, i don't think I tried the second. I'm not saying that it didn't work, it's just that I came across a different way that worked. Thanks for the help.
"Any sufficiently advanced technology is indistinguishable from magic" [Arthur C. Clark]
I was finally able to get it to work thanks to the code found Here. Thanks for all the help, I really appreciate it.
"Any sufficiently advanced technology is indistinguishable from magic" [Arthur C. Clark]</td></tr></table>
Hello.
I'm doing an SQL query and converting it to XLS. When I run the query on the localhost DB, The file outputs to the specified location at C:/tmp/myfile.csv. However, when I run the query on the live DB, it outputs to the DB server at /home/mysql/csv/myfile.csv. As result, I can only...
As an independent query, the following works fine. It does not work when i plug it into my query in the previous post.
SELECT
CONCAT('/tmp/',DATE_FORMAT(curdate(), '%Y-%m-%d'),'letters.csv') AS your_date;
"Any sufficiently advanced technology is indistinguishable from magic" [Arthur C...
Hello. I'm making a routine to run daily in SQL Workbench. I want the exported file to have curdate() added to the name for organizational purposes.
SELECT
d.emailaddress,
d.fullname,
d.address,
d.city,
d.state,
d.zip,
d.makepayabletoname,
d.makepayabletoaddress...
OK, I've found an even simpler way to do this. I can send an SQL query directly to a CSV file with the following PHP code. Problem is, I can't seem to get the syntax right. the lines ESCAPED BY '\\' and LINES TERMINATED BY '\n' have some special characters that i do not know how to escape...
ugh... OK, it turns out that i was referencing a different export.php file that was already in the directory. This export.php gives me a whitescreen both with and without printing to excel.
<table width="300" border="0"><tr><td><img src="http://3dgstudios.com/images/gorilla.jpg"></td><td>"Any...
I checked the query in mySQL workbench, it works fine. That is passed as a value for 'query'. I removed the stripslashes() because it didn't seem necessary. Still getting nothing in the excel export except "
Hello all-
I'm trying to export to excel from a php mysql_query. It opens excel, but all i get is "  " in Cell A1.
<?php
$str='select d.emailaddress, d.fullname, d.address, d.city, d.state, d.zip, d.makepayabletoname, d.makepayabletoaddress, d.makepayabletocity, d.makepayabletostate...
@jpadie- yes, thanks. We decided to go with a slightly different method; pulling directly from the DB to excel. It cut out several languages that didn't need to be there.
Hello,
I modified the code from here but i can't get it to work on my site. the only thing i changed was the id of the table: tbl2013-06-03
function write_to_excel()
{
str="";
var myTable = document.getElementByID('tbl2013-06-03');
var rows = myTable.getElementsByTagName('tr')...
The issue has been resolved.
I converted my echo statements to html; making php the exception rather than the rule.
<td colspan="1"><a href="javascript:toggle_visibility('<?php echo $tblName;?>' , '<?php echo $lnkName;?>');">
<div align="right" id="<?php echo $lnkName; ?>" name="<?php echo...
Thank you Feherke. Please excuse the bad code, I pulled that from a website somewhere. tr style="display: none" does hide the rows as intended, but the expand/collapse link doesn't work. Any suggestions?
Hello.
I'm trying to implement this into my site.
function toggle_visibility(tbid,lnkid) {
if (document.getElementsByTagName) {
var tables = document.getElementsByTagName('table');
for (var i = 0; i < tables.length; i++) {
if (tables[i].id == tbid){
var trs =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.