Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Using PHP to Database Tables via Email

 
   Database Forums (Home) -> PHP SQL RSS
Next:  can't create table from package  
Author Message
aj

External


Since: Dec 08, 2007
Posts: 8



(Msg. 1) Posted: Sat Dec 08, 2007 7:42 am
Post subject: Using PHP to Database Tables via Email
Archived from groups: alt>php>sql (more info?)

Hello all.

I use 1and1 as my webhost.

Using their configuration, the web server and mysql server are 2
different machines.

I have a web application that uses 2 database tables. I am looking
for a convenient way to get backup's of the database tables at a click
of a button on an admin section of my website. So far, I have had no
luck.

My latest attempt involved the following steps:

1) Running a system command to put the database tables in a file:
system("mysqldump -h $dbhost -u $dbuser -p $dbpass $dbname >
$backupfile");

2) Composing an email using php's Mail library and adding the
aforementioned backup file as an attachment.

Anyone have any experience with this? Offer any insight?

Thanks,
AJ

 >> Stay informed about: Using PHP to Database Tables via Email 
Back to top
Login to vote
Paul Lautman

External


Since: Feb 28, 2006
Posts: 55



(Msg. 2) Posted: Sat Dec 08, 2007 2:58 pm
Post subject: Re: Using PHP to Database Tables via Email [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

aj wrote:
> Hello all.
>
> I use 1and1 as my webhost.
>
> Using their configuration, the web server and mysql server are 2
> different machines.
>
> I have a web application that uses 2 database tables. I am looking
> for a convenient way to get backup's of the database tables at a click
> of a button on an admin section of my website. So far, I have had no
> luck.
>
> My latest attempt involved the following steps:
>
> 1) Running a system command to put the database tables in a file:
> system("mysqldump -h $dbhost -u $dbuser -p $dbpass $dbname >
> $backupfile");
>
> 2) Composing an email using php's Mail library and adding the
> aforementioned backup file as an attachment.
>
> Anyone have any experience with this? Offer any insight?
>
> Thanks,
> AJ

I too used 1and1 until recently. Their customer service has gone so far
downhill, I have moved all my hosting to QiQ
http://www.myqiq.info/uk/aff.php?aff=023

BTW, you haven' told us in which ways these attempts have failed?

Can't you use phpMyAdmin?

 >> Stay informed about: Using PHP to Database Tables via Email 
Back to top
Login to vote
Anze

External


Since: Apr 05, 2005
Posts: 17



(Msg. 3) Posted: Sat Dec 08, 2007 4:58 pm
Post subject: Re: Using PHP to Database Tables via Email [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> I too used 1and1 until recently. Their customer service has gone so far
> downhill, I have moved all my hosting to QiQ
> http://www.myqiq.info/uk/aff.php?aff=023

And you are so pleased with QiQ that you are acting as their affiliate? Smile
(I have no connection to either of them, actually, couldn't care less...
Just doesn't seem a fair way of affiliate marketing to me.)

@aj:
Sending huge files via e-mail system might not be the best option. How about
uploading them somewhere?
Even better, if the admin has to click to do a backup, why not just offer
him a download of the generated file? This is what I frequently do in my
CMS...

Best,

Anze
 >> Stay informed about: Using PHP to Database Tables via Email 
Back to top
Login to vote
Paul Lautman

External


Since: Feb 28, 2006
Posts: 55



(Msg. 4) Posted: Sat Dec 08, 2007 5:58 pm
Post subject: Re: Using PHP to Database Tables via Email [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Anze wrote:
>> I too used 1and1 until recently. Their customer service has gone so
>> far downhill, I have moved all my hosting to QiQ
>> http://www.myqiq.info/uk/aff.php?aff=023
>
> And you are so pleased with QiQ that you are acting as their
> affiliate? Smile (I have no connection to either of them, actually,
> couldn't care less... Just doesn't seem a fair way of affiliate
> marketing to me.)
I really do think they're a great company and I really have just moved from
1and1 due to the reason I stated. If I am going to recommend them, I figure
I might as well take up their offer of payment. I don't actively push my
affiliate link in general. You won't find it on a sig line, nor even on any
web sites. As I say, it seems silly not to take their offer, if I'm going to
recommend them.

The link on the end of the url is quite plainly an affiliate link. I haven't
tried to hide it in any way. What do you think is so unfair about it?
 >> Stay informed about: Using PHP to Database Tables via Email 
Back to top
Login to vote
Tom

External


Since: Dec 12, 2006
Posts: 238



(Msg. 5) Posted: Thu Dec 20, 2007 10:32 am
Post subject: Re: Using PHP to Database Tables via Email [Login to view extended thread Info.]
Imported from groups: per prev. post (more info?)

Back to top
Login to vote
David Quinton

External


Since: Apr 14, 2005
Posts: 14



(Msg. 6) Posted: Fri Dec 21, 2007 7:55 am
Post subject: Re: Using PHP to Database Tables via Email [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sat, 8 Dec 2007 19:17:39 -0000, "Paul Lautman"
wrote:

>I too used 1and1 until recently. Their customer service has gone so far
>downhill, I have moved all my hosting to QiQ
>http://www.myqiq.info/uk/aff.php?aff=023

Not critiicising (really!), but I wouldn't be too impressed if my
Host's default PHP installation was still v4
http://www.myqiq.info/status/index.php?action=phpinfo
seeing that it will be unsupported in less than 10 days time.
--
Locate your Mobile phone: <http://www.bizorg.co.uk/news.html>
Great gifts: <http://www.ThisBritain.com/ASOS_popup.html>
 >> Stay informed about: Using PHP to Database Tables via Email 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Dropping all tables in a database? - Hi, I'm using php 4.4.4 with MySQL 5.0 on Linux. Short of dropping the database, which my user does not have privileges to, what is the simplest way to purge all data from the db? By this I mean not only deleting data from tables but also the tables..

rename all tables in database newbie question - I'm not very familiar with SQL - Using mySQL I need to add or remove prefixes from table names - can anyone tell me an SQL (or PHP for that matter) way to do this please? I can't seem to find a way to do it. thanks cleo

HTML - EMAIL Problem - I'm having a problems sending out graphics in an HTML email. The headers are; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= "Content-Transfer-Encoding...

Setting up Apache2 (Test Server on localhost) for email - Hi all, I am designing a PHP5, MySQL website. I am developing on my local machine, Windows XP and Apache 2. How do I test sending emails PHP mail() function. Do I need to set up Apache to run CGI. If so, how. Please. Thank you in advance, Clinton

Get ID's from two different tables - Hiho, I have the following problem. Two tables which have the same primary key "statusid". I one table i have 10 entries and in the other 7. The 7 from the second table are also in the first. What i want to do is to get the other 3. As th...
   Database Forums (Home) -> PHP SQL All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]