Archadian Posted February 17, 2007 Share Posted February 17, 2007 I was testing a few things out inserting info into the DB. Here is my code: <?php include('include/dbinfo.inc'); include('include/functions.php'); $name = "home"; mysql_query("SELECT name, dir FROM link", $db) or die(mysql_error()); mysql_query("INSERT INTO link(name, dir) VALUES('$name', '$dir')", $db) or die("Did not insert info."); ?> The info isn't being inserted into the DB. I saw this at the bottom of the table page: Error The additional Features for working with linked Tables have been deactivated. To find out why click here When i click "here" it gives me this: PMA Database ... not OK[ Documentation ] General relation features Disabled I don't know if it has anything to do with this. Could someone give me some info about this and tell me why the info isn't being inserted into the DB? Thanks. Quote Link to comment Share on other sites More sharing options...
JJohnsenDK Posted February 17, 2007 Share Posted February 17, 2007 do you just want to insert some data into the database? if yes why use the link() function? Quote Link to comment Share on other sites More sharing options...
Archadian Posted February 17, 2007 Author Share Posted February 17, 2007 its not a function, read up on how to insert data into the database mysql_query("INSERT INTO table (col1, col2, col3) VALUES (val1, val2, val3)") table() being link()...link being the name of the table in the DB Quote Link to comment Share on other sites More sharing options...
JJohnsenDK Posted February 17, 2007 Share Posted February 17, 2007 Hmm... i know how it works... try this insted... <?php include('include/dbinfo.inc'); include('include/functions.php'); $name = "home"; $dir = "hello_mate"; mysql_query("SELECT name, dir FROM link") or die(mysql_error()); mysql_query("INSERT INTO link SET name = '$name', dir = '$dir'") or die("Did not insert info."); ?> Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 17, 2007 Share Posted February 17, 2007 Googling the error you got turned up this: http://www.psoft.net/HSdocumentation/sysadmin/phpmyadmin_linked_tables.html Quote Link to comment Share on other sites More sharing options...
Archadian Posted February 17, 2007 Author Share Posted February 17, 2007 Could it be the name of the table itself? It is inserting the data into the DB, i just noticed it. Its also showing up on the website, but when i am looking at the table it doesn't show the size of the info in the table, it just says unknown. Quote Link to comment Share on other sites More sharing options...
Archadian Posted February 17, 2007 Author Share Posted February 17, 2007 i tried that jesirose and its still giving the error Quote Link to comment Share on other sites More sharing options...
Archadian Posted February 17, 2007 Author Share Posted February 17, 2007 here is the table: Table Action Records Type Size nav unknown unknown 1 table(s) Sum 0 -- 0 Bytes but there is info in the table. phpMyAdmin error? Quote Link to comment Share on other sites More sharing options...
Archadian Posted February 17, 2007 Author Share Posted February 17, 2007 Anyone know? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.