Jump to content

[SOLVED] mysql insert error


plodos

Recommended Posts

error

<?php
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 '., name = yName, presenter_country = Vyprus, institution' at line 2
INSERT into registration SET title= Assist. Prof. Dr., name = yName, presenter_country = Vyprus, institution = matras, authors_name = constant, iteration, aut_email = asd@æsd.com
?>

 

$q = " INSERT into registration SET
		title= '{$title}',

		name = '{$name}',

		presenter_country = '{$presenter_country}',

		institution = '{$institution}',

		authors_name = '{$authors_name}',

		aut_email = '{$aut_email}',

		alt_email = '{$alt_email}',

		fee_info = '{$fee_info}',

		paper_code = '{$paper_code}',

		conference_country = '{$conference_country}',

		Conference_title = '{$Conference_title}',

		attendance_info = '{$attendance_info}',

		postal_address = '{$postal_address}' ";

		mysql_query($q) or die(mysql_error()."</br>".$q);

 

i didnt see error:S

Link to comment
https://forums.phpfreaks.com/topic/144003-solved-mysql-insert-error/
Share on other sites

Bad syntax

 

$q = "INSERT INTO `registration`
	(`title`,`name`,`presenter_country`,`institution`,`authors_name`,`aut_email`,`alt_email`,
	`fee_info`,`paper_code`,`Conference_country`,`attendance_info`,`postal_address`)

  VALUES
  	('".$title."','".$name."','".$presenter_country."','".$institution."','".$authors_name."','".$at_email."','".$alt_email."',
  	'".$fee_info."','".$paper_code."','".$Conference_country."','".$attendance_info."','".$postal_address."')";

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.