Jump to content

cverzonilla

Members
  • Posts

    5
  • Joined

  • Last visited

cverzonilla's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I don't understand why this fixed it but it did. I changed the name of the fields too "texta", "textb" etc. etc.I geuss MySQL didn't like the fields named "1", "2", etc. etc.Thank you
  2. Thank you. You did help me.
  3. "Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1824 (text1) VALUES ('helloo')' at line 1"I'm getting the above Error when using the script below. I don't understand. I'm trying to use a form to insert data on my "any" table column "1". The code is correct. When I switch to another table on my database it works but on my "any" table it doesn't.(along with 4 other tables). Two out of six tables work. I don't get it. I've been trying to fix it for hours. Can anyone help?<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title><style type="text/css"><!--body {background-color: #FFFFBF;}--></style></head><body><?php$con = mysql_connect("mysql","cverzonilla","******");if (!$con){die('Could not connect: ' . mysql_error());}mysql_select_db("my_db", $con);$sql="INSERT INTO any (1)VALUES('$_POST[comment]')";if (!mysql_query($sql,$con)){die('Error: ' . mysql_error());}echo "Thank you";mysql_close($con)?></body>
  4. "Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1824 (text1) VALUES ('helloo')' at line 1"I'm getting the above Error when using the script below. I don't understand. I'm trying to use a form to insert data on my "any" table column "1". The code is correct. When I switch to another table on my database it works but on my "any" table it doesn't.(along with 4 other tables). Two out of six tables work. I don't get it. I've been trying to fix it for hours. Can anyone help?<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Untitled Document</title><style type="text/css"><!--body { background-color: #FFFFBF;}--></style></head><body><?php$con = mysql_connect("mysql","cverzonilla","******");if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("my_db", $con); $sql="INSERT INTO any (1)VALUES('$_POST[comment]')";if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); }echo "Thank you";mysql_close($con)?></body>
  5. cverzonilla

    MySQL INDEXing

    I don't understand what indexing is in MySQL. What is it, why do you do it and how do you do it?I also don't understand what NULL means. What happens when you assign a field as NULL. Why would you do it?Thank you
×
×
  • Create New...