At 15:45 24-2-03 -0500, Keith C. Ivey wrote:
On 24 Feb 2003, at 21:07, Daneman wrote:

> INSERT INTO MyTable (MyFields) VALUES ($val1, $val2, etc);
>
> Question marks are no longer replaced with NULL values in the text
> column this way, still, when I enter question marks into the charvar
> fields, the record is not taken into he database. I'm not sure whether
> this is a mySQL or a Perl problem at this stage.

I think it's a user problem, but it's hard to be absolutely sure
because you still haven't posted the exact Perl code you're using

I have somewhere in the last half hour. Here it is:


$sql = qq{ INSERT INTO main (id, categorie, achternaam, voornaam, aanspreektitel, straat, huisnummer, postcode, plaatsnaam, telefoon, mobiel, email1, email2, tekst) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?) };

$sth = $dbh->prepare( $sql);

$sth->execute($id, "now()", $achternaam, $voornaam, $aanspreektitel, $straat, $huisnummer, $postcode, $plaatsnaam, $telefoon, $mobiel, $email1, $email2, $tekst);
(BTW: the "now()" value results in an empty (0000.00.00 etc) date field)



I'm having to guess [..]
Are you getting any error message?

I'm not getting any errors. I've tried eval{my code}; print $@ if ($@); but I didn't get any errors at all.


Do I have to do: $sth->execute("$id", "$achternaam", "etc")?


Do you have RaiseError
on, or at least PrintError?

No, I must admit I don't know what they are.. (only beginning)


Thanks,
Dave


--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Reply via email to