PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
venture_name = $_POSTї'venture_name'];
$result = mysql_query("SELECT venture_id FROM venture_master WHERE venture_type = '$venture_name' ", $linkid)
or die("Query failed: " . mysql_error());
while ($row = mysql_fetch_row($result))
{
$venture_id = $rowї'venture_id'];
}
The MySQL error is letting you know that you have tried to insert data into a database with something like INSERT INTO `myTable` VALUES('one','two','three') but the number of values you are setting in the query doesn't match the number of columns in the table.
If you have an auto_id column for example you still need to include it in your VALUES but set it as a blank value ie.. VALUES('','one','two','three') (the first value is the auto increment column)