Archive for September, 2007

C#.Net: How to Check/Uncheck the CheckBox in DataGridView1

Friday, September 28th, 2007

private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgse)
{
bool value = (bool)(this.dataGridView1.Rows[e.RowIndex].Cells[0].Value ?? false);
this.dataGridView1.Rows[e.RowIndex].Cells[0].Value = !value;
}

Difference between MyISAM and InnoDB

Tuesday, September 25th, 2007
  1. MyISAM is faster then InnoDB
  2. MyISAM supports table locking and InnoDB supports row locking
  3. MyISAM has full-text indexing where innodb doesn’t
  4. InnoDB supports transaction, commits and rollbacks where MyISAM lacks these

Remove all characters except numbers and letters from a string in PHP

Friday, September 21st, 2007

<?php

$string = ‘your string’;

$new_string = ereg_replace( ‘[^A-Za-z0-9]‘, ”, $string);

echo $new_string;

?>