[PHP-DB] How do I backup my MySQL database? asks a Newbie.
*** NEWBIE ALERT! *** I am only new at this, but I have discovered one thing: I love php and mysql! I now have a couple of tables of information in a MySQL database. The site is run by my ISP so I don't have control of the server. My question is: how do I via php/mysql make a backup of the entire database so that I can restore it again should the worst happen and the server goes down? I would really appreciate your comments on this! Dan == Regards from Denmark, Europe Please cc your reply to [EMAIL PROTECTED] == I haven't lost my mind, I've got it backed up on TAPE somewhere... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Pick a row, any row.
Newbie alert! Hi. Just a qucik question: Does anyone know of a random function that I can use. I want to query my database. Then random pick one of the rows in the result, and then display the contents of the randomly picked row. How can I pick a random row? Thank you in advance. -- == Regards from Denmark, Europe Please cc your reply to [EMAIL PROTECTED] == I haven't lost my mind, I've got it backed up on TAPE somewhere... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Random - not that random
Newbie alert Hi! Here is a piece of coding. It randomly choose between four options to display on my homepage. The problem is that it doesn't seem to be that random - rather biased. The last option $message[3] is displayed 9 out of 10 times. Any suggestions? script language=php $message[0] = 'a href=index.php3?Page=vognimg border=0 src=images/trolley.jpgbrRengøringsvogne, mopper m.m./a'; $message[1] = 'a href=index.php3?Page=nilfiskimg border=0 src=images/nilfisk.gifbrNilfisk Advance rengøringsmaskiner/a'; $message[2] = 'a href=index.php3?Page=poleringimg border=0 src=images/ladder.jpgbrHar du set vores Vinduespudserstiger?/a'; $message[3] = 'a href=index.php3?Page=polishimg border=0src=images/logo-bison.gifbrVi importerer selv vore polisher fra en af Canadas førende Polishfabrikker./a'; $number = mt_rand(0,3) ; print$message[$number]; /script -- == Regards from Denmark, Europe Please cc your reply to [EMAIL PROTECTED] == I haven't lost my mind, I've got it backed up on TAPE somewhere... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] mysql/php select using date in where clause
***NEWBIE ALERT*** (I am only very new at this) PHP and MySQL OK - I have a table with data and one of the fields is a Date field. Now I would like to SELECT all records where the date is less that 45 days old. Eh, How do I do that? I have tried this: #Declaring variables $today=date(Y-m-d); $lastmonth = $today-30 $query = SELECT * FROM customers WHERE Site='egebjergnet' AND DatoOprettet'$lastmonth' ORDER BY FirmaNavn; AND I get an error, of course. hmmm -- == Regards from Denmark, Europe Please cc your reply to [EMAIL PROTECTED] == I haven't lost my mind, I've got it backed up on TAPE somewhere... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] mysql/php select using date in where clause
IT works! Thanks! martin helie [EMAIL PROTECTED] skrev i en meddelelse 9crqud$voj$[EMAIL PROTECTED]">news:9crqud$voj$[EMAIL PROTECTED]... Here's how I'd do it: SELECT * FROM customers WHERE Site='egebjergnet' AND TO_DAYS(NOW()) - TO_DAYS(date_column) = '45' where date_column contains record dates... Martin Dan Eskildsen [EMAIL PROTECTED] wrote in message 9crq7l$mfb$[EMAIL PROTECTED]">news:9crq7l$mfb$[EMAIL PROTECTED]... ***NEWBIE ALERT*** (I am only very new at this) PHP and MySQL OK - I have a table with data and one of the fields is a Date field. Now I would like to SELECT all records where the date is less that 45 days old. Eh, How do I do that? I have tried this: #Declaring variables $today=date(Y-m-d); $lastmonth = $today-30 $query = SELECT * FROM customers WHERE Site='egebjergnet' AND DatoOprettet'$lastmonth' ORDER BY FirmaNavn; AND I get an error, of course. hmmm -- == Regards from Denmark, Europe Please cc your reply to [EMAIL PROTECTED] == I haven't lost my mind, I've got it backed up on TAPE somewhere... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] file name extentions
Hi there, Currently my ISP has PHP 3 installed and to run php scripts I have to save the file as name.php3 I expect to install my own server and php4 in the foreseeable future - how can I save the files as .php so that they are upwardly compatible? I have tired using the filenmae file.php but the server will not execute the file. Any suggestions? Regards, Dan -- == Regards from Denmark, Europe Please cc your reply to [EMAIL PROTECTED] == I haven't lost my mind, I've got it backed up on TAPE somewhere... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] No. of Users online right now?
Hi there, This is a NewBie Question: While out surfing I have often seen a message like: "There are 17 users on this site at the moment." Can I do this with php? Just to show how many people are on (browsing) the site at that moment? I run a community website. Thanks == Regards from Denmark, Europe Please cc your reply to [EMAIL PROTECTED] == I haven't lost my mind, I've got it backed up on TAPE somewhere... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] SSI and PHP?
Hi there, Can anyone tell me if it is possible to combine Server Side Includes with PHP? If not, is there a work around? Please cc your comments to [EMAIL PROTECTED] I would like everyone who commented on my queries the last couple of days. I went from not knowing a single thing about PHP and MySQL to a day later having already programmed a small application that will display newspaper articles. Thanks! Dan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] SSI and PHP?
I meant: I would like to THANK everyone who commented on my queries the last couple of days. ""Dan Eskildsen"" [EMAIL PROTECTED] skrev i en meddelelse 98cvq8$7dr$[EMAIL PROTECTED]">news:98cvq8$7dr$[EMAIL PROTECTED]... Hi there, Can anyone tell me if it is possible to combine Server Side Includes with PHP? If not, is there a work around? Please cc your comments to [EMAIL PROTECTED] I would like everyone who commented on my queries the last couple of days. I went from not knowing a single thing about PHP and MySQL to a day later having already programmed a small application that will display newspaper articles. Thanks! Dan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Where do I get started?
Thanks for the comments. The server is running both MySQL and PHP. How do I get started that this? Can anyone recomment a good book? Thanks again. ""Angerer, Chad"" [EMAIL PROTECTED] skrev i en meddelelse 9E35C54B0C7AD411B5C1009027DE539940B515@MSPMX01">news:9E35C54B0C7AD411B5C1009027DE539940B515@MSPMX01... Dan, I think it is a very powerful combination. PHP is easy to learn as is mySQL. They are both free and powerful. Question 2: Yes you can do about anything to a database with PHP including updating field data, adding field data, and even creating a new database from a web front end. Chad -Original Message- From: Dan Eskildsen [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 08, 2001 5:35 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP: Good for articles? Hi everyone. I am a freelance html web designer - and I am new at it. I have also learnt Javascript. I have a customer - a local newspaper - who wants me to update their site weekly with newspaper articles. I have been doing this in html. I recently changed ISP - and my new ISP allows me to run a MySQL database and PHP. I haven't used PHP before and I am now looking into it as a possiblity to dynamically create html pages that contain the articles sucked out of a SQL database. I was wondering if there is anyone out there who can tell me if PHP + MySQL is a good setup / combination for this type of application. Another Question: Can users via PHP update field data in a MySQL database? I would really appreciate any comments. Please cc: your reply to [EMAIL PROTECTED] It's snowing over here! Regards, Dan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]