Start a magento instance programmatically

This Code:

$mageFilename = 'app/Mage.php';
require_once $mageFilename;
ini_set('display_errors', 1);
error_reporting(E_ALL & ~E_NOTICE);
Mage::register('isSecureArea', 1);
//your mage code here

Inserting into SQL without specifying primary column

If Primary key is set to Auto-increment, there are chances that you would not want to provide its value in insert query.


Here is how to do it in MySQL:
INSERT INTO table_name VALUES (NULL, 'column b', 'col c');

Assumption^: The first column is the primary key set to AI

Similarly you can skip columns for other non-required data:
INSERT INTO table_name(col b,col c) VALUES ('column b', 'col c');