Question : SQL insert not working

I am trying to do a basic sql insert but it isn't inserting. I am not getting an error either though.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
<?php
if (isset($_POST['Submit'])) {
$email = mysql_real_escape_string($dbc, trim($_POST['email']));
$dbc = mysql_connect('localhost', 'root', 'root')
or die('Failed to connect to MYSQL Server');
mysql_select_db("test", $dbc);
$query = "INSERT INTO download (email) VALUES ('$email')";
$result = mysql_query($query, $dbc)
or die (mysql_error($dbc));
mysql_close($dbc);
}
?>

Answer : SQL insert not working

Hi,

You can asign the Display and Value Members of the combo and the datagrid will do the match for you as long the field asigned to the comboboxcolum have values of the datasource asigned, like this:

        Dim dgvc As DataGridViewComboBoxColumn
        dgvc = CType( dgvRO.Columns("cboItemNo"), DataGridViewComboBoxColumn)
        dgvc.DataSource = YOUDATASOURCE
        dgvc.DisplayMember = "THE FIELD YOU WANT TO DISPLAY"
        dgvc.ValueMember = "THE FIELD THAT MATCH IN BOTH TABLES"

This should be before you load you datagrid.

Hope it helps,
Random Solutions  
 
programming4us programming4us