in reply to sth fetch only grabbing back first result

I don't see any errors in your Perl code (other than using $dbh->errstr when you should be using $sth->errstr which should not impact your problem). You are binding columns correctly. Either you don't have your SQL right, or your data is not what you think it is.
  • Comment on Re: sth fetch only grabbing back first result

Replies are listed 'Best First'.
Re^2: sth fetch only grabbing back first result
by Anonymous Monk on Aug 10, 2006 at 19:05 UTC
    I don't think it can be my data because I'm just storing the time as a timestamp.
    my $data = qq(INSERT INTO searches (search, engine, time) values(?,? +,NOW())); my $sth = $dbh->prepare($data); $sth->execute("$search", "$engine");
    search and engine are irrelevant right now, it's just time that's not coming back I'm assuming. The time column is of datetime and this is all I used to set it all up.
    "CREATE TABLE IF NOT EXISTS searches ( id int auto_increment NOT NULL, search VARCHAR(150) NOT NULL, engine VARCHAR(20) NOT NULL, time datetime, primary key (id) )");
    Thank you.