Php and MySQL Long Text Problem
Though mysql casting is one of the way to address special characters in the text,there is another simple function which lets you to do this..
This http://php.net/manual/en/function.mysql-real-escape-string.php lets you to do this very easily
require_once'config1.php';
$sn = mysql_connect($mysql_hostname, $mysql_user, $mysql_password);
mysql_select_db($mysql_database, $sn);
$a=file_get_contents("http://www.google.com");
echo $a;
$a1="";
//Making Mysql escape string
$query = sprintf("INSERT INTO `testingtable` ( `no` , `a1` )VALUES (%d , '%s')",
mysql_real_escape_string($a1,$sn),
mysql_real_escape_string($a,$sn));
//Inserting the text
mysql_query($query, $sn);
You can use this function for Insert and Update also