Note that there are some explanatory texts on larger screens.

plurals
  1. POMySQL I can not write data into the database
    text
    copied!<p>Hello guys i have problem with inserting data in mysql database.I accepted a project that my friend worked.</p> <p>I make simple php test file and try to insert in table <code>_content_city</code>. query is successfully executed bu no records in database column when i check in phpmyadmin.</p> <pre><code>$handler = mysql_connect($server, $user, $pass); $database = mysql_select_db($dbname); if(!$handler) : die("Faild connect to MySQL :" . mysql_error()); endif; if(!$database) : die("DB with name ". $dbname . " no exists " . mysql_error()); endif; mysql_query("INSERT INTO _content_grad (wishlist) VALUES('BlaBlaBla') ") or die(mysql_error()); printf ("Inserterd records: %d\n", mysql_affected_rows()); </code></pre> <p>When i execute this code in browser i have message <strong>Inserterd records: 1</strong> But when i check in phpmyadmin that data no exist in column. I dont know whay.</p> <p>You guys can see image and u will see column <strong><code>wishlist</code></strong> is empty.</p> <p><a href="http://img710.imageshack.us/img710/1852/5hfw.png" rel="nofollow">http://img710.imageshack.us/img710/1852/5hfw.png</a></p> <p>I check foreign_keys and remove all foreign_keys and again dont work.</p> <p>Like test i make new database with name <strong>new_test_base</strong> and make table <strong>albums</strong> and column <strong>title</strong> and like test i execute my php code and all data is successfully inserted when i check in phpmyadmin. So problem is only in that database, i have full access and privilegies i use <strong>root (ALL)</strong></p> <p>Any solution to fix this. Thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload