Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 1st, 2003, 02:46 AM
Migs Migs is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 1 Migs User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Oracle Perl Help...

I'm trying to write a CGI prog that will search through my database and bring up specific information. So I tested it out on the default table emp and I can get that to work. So I can pass through an employee's and and grab his info. But when I try to get it to work for my specific table, nothing comes up, but I do have a few entries within the table.

So this is the code I use to get to the emp database:

my $sth = $dbh->prepare("

select * from emp where upper(ENAME) = upper('$ename')

" );

$sth->execute()|| die "Oracle connection failed!";

while (my $search = $sth->fetchrow_hashref())
{
print "<TR>";
print "<TD>".$search->{EMPNO};
print "<TD>".$search->{ENAME};
print "<TD>".$search->{JOB};
print "<TD>".$search->{HIREDATE};
print "<TD>".$search->{SAL};
print "\n";
}

print "</TR>\n";

And this the code I use for my database:

my $sth = $dbh->prepare("

select * from shelter where upper(SNAME) = upper('$sname')

" );

$sth->execute()|| die "Oracle connection failed!";

while (my $search = $sth->fetchrow_hashref())
{
print "<TR>";
print "<TD>".$search->{SNAME};
print "<TD>".$search->{CITY};
print "<TD>".$search->{PNUMBER};
}

print "</TR>\n";

I know the parameters coming through are correct because I put in a little print statement and it displays the data coming in. So what am I doing wrong? Are there permissions for databases that I don't know about? Thanks in advance!

-migs

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Oracle Perl Help...

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap