Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [PHP-DB] Command Line Error
I didn't realize I was required to do this.

Would you put this line where it belongs?  I am not sure what to do with the
<? and ?> and if these are needed for the script to run from the command
line.

Ron

#!/<path to php cli binary>


<?

$todays_date=DATE("Y-m-d");

$username="user";
$password="password";
$database="database";

 mysql_connect(localhost,$username,$passw
ord);
@mysql_select_db($database) or die( "Unable to select database");

$query = "DELETE FROM `webcardtable` WHERE `date_to_be_deleted` LIKE
'$todays_date'";
mysql_query($query);
mysql_close();
?>

----- Original Message -----
From: <php-list-replies@listmail.innovate.net>
To: Ron Piggott <ron.php@actsministries.org>
Sent: Monday, March 28, 2005 11:02 AM
Subject: Re: [PHP-DB] Command Line Error


> are you putting:
>
>   #!/<path to php cli binary>
>
> at the top of your page? if not, it will be interpreted as a shell
> (bash/csh) script.
>
>
> ---------- Original Message ---------- 
>
> ---------- End Original Message ----------
>

Report this thread to moderator Post Follow-up to this message
Old Post
Ron Piggott
03-28-05 08:56 PM


Re: [PHP-DB] Command Line Error
Goes right where you have it

#!/<path to php cli binary>
<?php
...rest of your script

?>

Bastien



>From: "Ron Piggott" <ron.php@actsministries.org>
>To: <php-list-replies@listmail.innovate.net>
>CC: "PHP DB" <php-db@lists.php.net>
>Subject: Re: [PHP-DB] Command Line Error
>Date: Mon, 28 Mar 2005 12:35:09 -0500
>
>I didn't realize I was required to do this.
>
>Would you put this line where it belongs?  I am not sure what to do with
>the
><? and ?> and if these are needed for the script to run from the command
>line.
>
>Ron
>
>  #!/<path to php cli binary>
>
>
><?
>
>$todays_date=DATE("Y-m-d");
>
>$username="user";
>$password="password";
>$database="database";
>
> mysql_connect(localhost,$username,$passw
ord);
>@mysql_select_db($database) or die( "Unable to select database");
>
>$query = "DELETE FROM `webcardtable` WHERE `date_to_be_deleted` LIKE
>'$todays_date'";
>mysql_query($query);
>mysql_close();
>?>
>
>----- Original Message -----
>From: <php-list-replies@listmail.innovate.net>
>To: Ron Piggott <ron.php@actsministries.org>
>Sent: Monday, March 28, 2005 11:02 AM
>Subject: Re: [PHP-DB] Command Line Error
>
> 
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php
>

Report this thread to moderator Post Follow-up to this message
Old Post
Bastien Koert
03-28-05 08:56 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP DB archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:52 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.