Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax Error..

Status
Not open for further replies.

Thomas001

Programmer
Joined
Jun 24, 2004
Messages
29
Location
US
This isn't getting put into the database, maybe it's because of a syntax error.. I'm not getting any error messages:


$creation = "INSERT INTO $uber_table ( `subject` , `comment` , `modif_sc` , `name` , `type`, `date` )
VALUES ('$subject', '$comment', '$modif_sc', '$name', '$type', NOW( ) )";


mysql_query($creation);
 
You should return a value from the call to mysql_query. In other words,

$result = mysql_query($creation);

Then, you'll be able to determine more easily what the problem may be:

$result = mysql_query($creation);
if (!$result) {
echo mysql_error, "<br>";
} else {
echo "successfully added row.";
}

Let me know what that error message says...

*cLFlaVA
----------------------------
A polar bear walks into a bar and says, "Can I have a ... beer?"
The bartender asks, "What's with the big pause?
 
*correction...

echo mysql_error(), "<br>";

*cLFlaVA
----------------------------
A polar bear walks into a bar and says, "Can I have a ... beer?"
The bartender asks, "What's with the big pause?
 
nm modif_sc was suppose to be sc


=) =) =)
 
Status
Not open for further replies.

Similar threads

Replies
2
Views
383
  • Locked
  • Question Question
Replies
2
Views
370
  • Locked
  • Question Question
Replies
19
Views
1K

Part and Inventory Search

Sponsor

Back
Top