HI Team,

I am new to PHP. I want to run below PHP script. I know mysql credentials.
I have installed PHP 5.x on my windos mahcine, now can any tell me how to run 
this script.
I ran 
C:\Program Files\PHP>php temp.php
PHP Fatal error:  Call to undefined function mysql_connect() in C:\Program Files
\PHP\temp.php on line 2

$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
    die('Could not connect: ' . mysql_error());

/* this should return the correct numbers of deleted records */
mysql_query('DELETE FROM mytable WHERE id < 10');
printf("Records deleted: %d\n", mysql_affected_rows());

/* with a where clause that is never true, it should return 0 */
mysql_query('DELETE FROM mytable WHERE 0');
printf("Records deleted: %d\n", mysql_affected_rows());


Reply via email to