jollyroger
Technical User
Hello there
Please can somebody help us? We are trying to create a web page after querying a mysql database.
We have managed to connect to the database and we get results from it, we have also managed to print this results onto a web page using:
while ( @ary=sel1->fetcharray() ) {
print "The query results: $ary[0] and $ary[1]","<br>\n";
}
BUT we don't want to do this. We want to capture the array in the bit here and then use it somewhere else in the script!
For example:
@ary=sel1->fetcharray();
But when we do this we get nothing back, even though earlier in the script we have called the array using the above print command?
Also, we have got an error message telling us that there is a unatural database disconnect.
Finally just for your information the database query is contained within a sub routine which is called earlier on in the script.
Any idea's
Thanks
Jollyroger
Please can somebody help us? We are trying to create a web page after querying a mysql database.
We have managed to connect to the database and we get results from it, we have also managed to print this results onto a web page using:
while ( @ary=sel1->fetcharray() ) {
print "The query results: $ary[0] and $ary[1]","<br>\n";
}
BUT we don't want to do this. We want to capture the array in the bit here and then use it somewhere else in the script!
For example:
@ary=sel1->fetcharray();
But when we do this we get nothing back, even though earlier in the script we have called the array using the above print command?
Also, we have got an error message telling us that there is a unatural database disconnect.
Finally just for your information the database query is contained within a sub routine which is called earlier on in the script.
Any idea's
Thanks
Jollyroger