superhoops
-
Posts
10 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by superhoops
-
-
Help would really be appreictaed.
-
Deleted the closing the connection part of it.I have another problem guysOn this page http://www.fmprotasy.com/Test/transfer_market1.phpWhen i put in information and click submit it says thisWarning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/www/fmprotasy.com/Test/insert.php on line 11Error:Here is the code i have for the insert page:Sorted it out. Thanks<?php$db = mysql_connect("db5.awardspace.com:3306", "fmpsite_reg", "password") or die("Could not connect.");if(!$db) die("no db");if(!mysql_select_db("fmpsite_reg",$db)) die("No database selected.");if(!get_magic_quotes_gpc())mysql_select_db("fmprotasy_reg", $con);$sql="INSERT INTO Market (Player, Price, Type, Position, Age, Ka, Ta, Pa, Sa)VALUES ('$_POST[Player]','$_POST[Price]','$_POST[Type]' '$_POST[Position]', '$_POST[Age]', '$_POST[GK]', '$_POST[DEF]', '$_POST[MID]', '$_POST[ATT]',)";if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }?>
If anyone could tell me the problem here i would be very greatful.
-
Sorted it out. Thanks
-
I did that and no luck still, once i upload the file to my server do i need to do anything else to it?You haven`t put commas between all fields. :)I hope it`s that. -
Hi my name is Michael and i have just started working with mysql today. I have a database already and want to add a table to it using sql/php code.Here is the code i have:
<?php$con = mysql_connect("db5.awardspace.com:3306","fmpsite_reg","password");if (!$con) { die('Could not connect: ' . mysql_error()); }// Create table in fmpsite_reg databasemysql_select_db("fmpsite_reg", $con);$sql = "CREATE TABLE Market (Player varchar(15),Price varchar(12),Type textPosition textAge int(2)Ka int(2)Ta int(2)Pa int(2)Sa int(2))";mysql_query($sql,$con);?>
I have put in the password field password so noone here takes it but i was wondering what is wrong with the code or what i need to do to create the tables as i uploaded this file and went to my database and the table had not been created.Any help will be greatly appreciated.ThanksMichael
Errors
in SQL
Posted
I get this error message:Error: Column count doesn't match value count at row 1The code for the page is:
Does anyone know the problem???