If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > cgi script runs on mysql 4 but not 3 ???

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-01-04, 01:29
WebDork WebDork is offline
Registered User
 
Join Date: Dec 2004
Posts: 1
cgi script runs on mysql 4 but not 3 ???

I have a web page that i made that uses a mysql(4.0) server which is at another location. Everything was working fine, but I have to use a database on one of the servers here at work. (3.23).

The database name, password, and username are the exactly the same as they were on the other server, (so, theoretically i should be able to just change the hostname in the script and all should be well).... its not...

here is the relevent piece of code from the script.
Code:
### GET THE MASTERRECORD FROM THE INPUT DATA
$www{'licnum'} = 0 if !$www{'licnum'};
$sql = qq{
select FIRSTNAM,LASTNAME,(CURDATE()+1-1) as Today, MASTREC
from CLIENT where LICENSEN = "$www{'licnum'}" and BIRTH = "$dob"; };
print "<!--\n##############\n$sql\n############## -->";

$sth=$dbh->query($sql);
print "<!-- after query -->";
%data=$sth->fetchhash();
print "<!-- after fetch -->";

if (!%data) {...
keep in mind that the ONLY thing i changed in the script was the hostname..
The page works fine when connecting to the 4.0 server.
When connecting to the 3.23 server it dosn't display the whole web page.
I added the comments above to see where the problem occurs. when looking at the html source for the output of the script, it gets to "after query" and then stops, which leads me to believe that the fetchhash part failed?


in lost here.

note: if i connect to the 3.23 mysql server from a command line and run the sql query it works perfectly.
Reply With Quote
  #2 (permalink)  
Old 12-01-04, 09:02
guelphdad guelphdad is offline
Registered User
 
Join Date: Mar 2004
Posts: 440
If the query runs fine from the command line then it isn't an issue with mysql. You should post this in the relevant scripting forum to get an answer to your problem.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On