First of all, you need to have php installed  WITHOUT a webserver.  If you
haven't done this already, download php, and this should be your
./configure command:
./configure --with-mysql
make; make install

your php binary will be in /usr/local/lib/php/bin/php (I think).  Then put
this in test.php, and chmod +x it:
#!/usr/local/lib/php/bin/php
$connection = mysql_connect("localhost","user","pass");
$db = mysql_select_db("db_to_use", $connection);
$sql = mysql_query("UPDATE table SET name='name', email='email'");

Then do ./test.php from the command line.

--
Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com




On Mon, 20 Aug 2001 14:13:34 +0100
Moise Bertrand TACHAGO <[EMAIL PROTECTED]> wrote:

> Hi,
> please, how to run php function which update mysql db from command line?
> 
> Thanks in advance
> 
> --
> Moise Bertrand TACHAGO
> Computer scientist, Volunteer DBMS Specialist
> SDNP Cameroon, 506 Hajal Center Building, Yaounde CAMEROON
> phone   (237)22 24 90
> E_mails [EMAIL PROTECTED]
>         [EMAIL PROTECTED]
> 
> 
> 

-- 
PHP General 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]

Reply via email to