I'm pretty new at php too but I think you are going about it all wrong.
First create a php script that accesses MySQL.
Like this:
<?php
$connection = mysql_connect("localhost","username","password");
if (!$connection) { echo "Couldn't make a connection!"; exit; }
$db = mysql_select_db("dbname", $connection);
if (!$db) { echo "Couldn't select database!"; exit; }
$sql = "SELECT * FROM tablename WHERE field LIKE '$fieldname'";
$sql_result = mysql_query($sql,$connection);
...
?>
Then put it on your web tree.
Then point to it with your browser.
I think you can execute a php script from the command line but I'm not
sure. I haven't done it.
--Ralph
Mujahid wrote:
>
> Hi,
>
> I been working on PHP/MySQL on Windows and to run some database script on
> MySQL, at the DOS command prompt I say
>
> >> mysql -u root -p < myscript.txt
>
> to run my script of inserts.
>
> Can anybody help me with an equlent at linux prompt ?
>
> TIA
>
> --
>
> --
> PHP Windows 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 Windows 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]