Your DBA will need to run commands like these to grant you enough privileges :
GRANT INSERT ON fyi.* TO dev; GRANT UPDATE ON fyi.* TO dev; GRANT DELETE ON fyi.* TO dev; GRANT SELECT ON fyi.* TO dev; GRANT CREATE ON fyi.* TO dev; GRANT DROP ON fyi.* TO dev;
Once you got the right privileges, run the following tutorial scrip again:
include "mysql_connection.php";
$sql = "INSERT INTO fyi_links (id, url) VALUES ("
. " 101, 'dev.fyicenter.com')";
if (mysql_query($sql, $con)) {
print(mysql_affected_rows() . " rows inserted.\n");
} else {
print("SQL statement failed with error:\n");
print(mysql_errno($con).": ".mysql_error($con)."\n");
}
$sql = "INSERT INTO fyi_links (id, url) VALUES ("
. " 102, 'dba.fyicenter.com')";
if (mysql_query($sql, $con)) {
print(mysql_affected_rows() . " rows inserted.\n");
} else {
print("SQL statement failed with error:\n");
print(mysql_errno($con).": ".mysql_error($con)."\n");
}
mysql_close($con);
?>
The script should return this:
1 rows inserted. 1 rows inserted.
No comments:
Post a Comment
Mayur Raiyani