hey guys, i have been working on a system to manage my mysql databases (add/alter tables and fields) because for some reason i cant access the control panel or mysql on my hosts site!
things are going along pretty well with my mysql management system, BUT.......... i created a tutorial system on my site when i could access my hosts cp and mysql, and i made the mistake of making the tutorial field a 'VARCHAR' when it should be 'LONGTEXT'.
i tried doing this:
but i still cant insert long tutorials into the table!?PHP Code:<?
$db="database";
$link = mysql_connect('localhost', 'username', 'password');
if (!$link)
die("Couldn't connect to MySQL");
mysql_select_db($db , $link)
or die("Couldn't open $db: ".mysql_error());
mysql_query("ALTER TABLE tutorials CHANGE tutorial tutorial LONGTEXT") or die(mysql_error());
echo "Table Changed";
mysql_close($link);
?>
any ideas guys?




Reply With Quote

Bookmarks