Hi,

Why cant I get to make this simple statement to work?

I have this perl script that would not resolve properly.
##################
my $sth = $DBH->prepare( qq!select start,stop FROM dialup WHERE sessionid =
$sessionid! );
$sth->execute;
my ($start,$stop) = $sth->fetchrow;
##################
This three liner  kept giving me undef values for the variables
$start and $stop even if there is a row entry with matching sessionid.
Whenever I do the mysql statement using the mysql client, it always
works, but whenever I try doing the same on perl, it keeps on giving
me undef - start *IS* always not zero.

+-----------+------------------+------+-----+
| Field     | Type             | Null | Key |
+-----------+------------------+------+-----+
| sessionid | int(10) unsigned |      | PRI |
| username  | char(20)         |      | MUL |
| start     | int(10) unsigned |      | MUL |
| stop      | int(10) unsigned |      | MUL |
+-----------+------------------+------+-----+

For whatever reason i could not seem to see beyond the logic, this
three lines is the only one in the whole script that kept screwing
up!

This is driving me crazy for the last 3 hours!

I need help before I go balistic.
Jaime

---------------------------------------------------------------------
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 <mysql-unsubscribe-##L=##[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to