RE: [PHP] PHP Command line script

2007-05-02 Thread Peter Lauri
Check the error from mysqli: http://fi.php.net/manual/en/function.mysqli-error.php Best regards, Peter Lauri www.dwsasia.com - company web site www.lauri.se - personal web site www.carbonfree.org.uk - become Carbon Free -Original Message- From: Nathaniel Hall [mailto:[EMAIL

Re: [PHP] PHP Command line script

2007-05-02 Thread Nathaniel Hall
Greg Donald wrote: On 5/1/07, Nathaniel Hall [EMAIL PROTECTED] wrote: I am attempting to run a script that will run from the command line nightly to update a field in a database. I already created a script that would access the database and insert most of the information when a webpage is

Re: [PHP] PHP Command line script

2007-05-02 Thread Richard Lynch
On Tue, May 1, 2007 3:13 pm, Nathaniel Hall wrote: ?php $mysqli = new mysqli('localhost', 'root', 'abc123', 'mydb'); if (mysqli_connect_errno()) { echo Unable to connect to database.\n; exit; } else { $login =

Re: [PHP] PHP Command line script

2007-05-01 Thread Daniel Brown
First and foremost, it's a VERY BAD idea to use root for MySQL. If your code isn't perfect (and even sometimes if it is), arbitrary commands and SQL injection attacks could lead to migraines that no Tylenol will ever be able to alleviate. Secondly, what error is the CLI kicking out when

Re: [PHP] PHP Command line script

2007-05-01 Thread Nathaniel Hall
Daniel Brown wrote: First and foremost, it's a VERY BAD idea to use root for MySQL. If your code isn't perfect (and even sometimes if it is), arbitrary commands and SQL injection attacks could lead to migraines that no Tylenol will ever be able to alleviate. I changed the user I was

Re: [PHP] PHP Command line script

2007-05-01 Thread Greg Donald
On 5/1/07, Nathaniel Hall [EMAIL PROTECTED] wrote: I am attempting to run a script that will run from the command line nightly to update a field in a database. I already created a script that would access the database and insert most of the information when a webpage is visited and I had no