Do you want to enable the command ‘Open as Administrator’ to the context menu in Ubuntu 12.04. When this feature is enabled, you should be able to right-click any file or folder in nautilus and open it as an administrator or root. This will come in handy especially for new users who want to edit or modify files or folders owned by the root user or administrator.
Archive for September, 2012
Add Open As Administrator to the Context Menu in Ubuntu
How to find id of last inserted row in MYSQL using PHP
To find id (auto increment) value of last inserted row, put the following code into the PHP page.
<?php
$link = mysql_connect('localhost', 'mysql_usenamer', 'mysql_password');
if (!$link) {
die('Could not connect:to the database ' . mysql_error());
}
mysql_select_db('mydb');
mysql_query("INSERT INTO mytable (user) values ('jijo')");
printf("Last inserted record has id %d\n", mysql_insert_id());
?>