mysql 4.0 -> 5.0 upgrade woes(?)


 
Thread Tools Search this Thread
Top Forums Web Development mysql 4.0 -> 5.0 upgrade woes(?)
# 1  
Old 05-02-2011
mysql 4.0 -> 5.0 upgrade woes(?)

We recently upgraded mysql from 4.0 to 5.0 and the following code is throwing (via DB.php) a "Database Error: Unknown" error. I can say with certainty that my connection parameters are correct and functional. It's been so long since I've done any mysql, I'm hoping someone can look at the code and find perhaps a deprecated technique or function that jumps out at them. If not, don't spend any time on it - I'll do my due dilligence :-) Thanks in advance:

Code:
<?
require_once('DB.php');
 
include ('db_params.php');
 
$dsn = "mysql://$user:$pass@$host/$db_name";
$db = DB::connect($dsn, false);
if (DB::isError($db)) {
die ($db->getMessage());
}
$film_sql = "select * from film where id = $film_id";
 
$q_film = $db->query($film_sql);
if (DB::iserror($q_film)) {
die($q_film->getMessage());
}
while ($row = $q_film->fetchRow()) {
$festival = $row[1];
$nationality = $row[2];
$genre = $row[3];
$blurb_id = $row[4];
$director = $row[5];
$title = stripslashes($row[6]);
$length = $row[7];
$status = $row[8];
$video = substr($row[10],0,1);
 
$blurb_sql = "select content from blurb where id = $blurb_id";
$q_blurb = $db->query($blurb_sql);
if (DB::iserror($q_blurb)) {
die($q_blurb->getMessage());
}
$description = stripslashes($db->getOne($blurb_sql));
$festival_sql = "select name from festival where id = $festival";
$festival_name = stripslashes($db->getOne($festival_sql));
if (DB::iserror($festival_name)) {
die($festival_name->getMessage());
}
}
$db->disconnect();
?>


Last edited by pludi; 05-02-2011 at 06:44 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

Samba Woes

Hi all With the recent virus attacks we have been tasked with upgrading Samba to a "secure" version. Currently running 3.0.29a and looking to put the latest version down 4.6.5. Being a lazy bod I have only ever installed this, a long time ago, when you could get it in BFF filesets. Have... (6 Replies)
Discussion started by: splattty
6 Replies

2. Solaris

Jumpstart woes

Hey, I have been battling with jumpstart for the past few days. Interface nxge0 is set on a vlan: nxge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 0.0.0.0 netmask ff000000 ether 0:21:28:3c:a0:6 nxge998000:... (0 Replies)
Discussion started by: stantonnet
0 Replies

3. Solaris

upgrade solaris mysql version...

hi i need to upgrade my solaris mysql version.. can u guide me the upgrade steps.. my current version is 4.0.31-log i need to upgrade to 5.0 .. thanks.. ---------- Post updated at 12:04 PM ---------- Previous update was at 11:28 AM ---------- my solaris version is 10.. ----------... (2 Replies)
Discussion started by: senkerth
2 Replies

4. Solaris

SSH woes

version of solaris: SunOS 5.8 Generic-117350-39 sun4u sparc SUNW,Netra-240 version of SSH: OpenSSH_4.4p1, OpenSSL 0.9.8d 28 Sep 2006 Task: I need to have another Machine ssh into my machine, by either RSA authentication or username/pass authentication. History: In the begining my... (4 Replies)
Discussion started by: EWTGPAC
4 Replies

5. Solaris

pkgadd woes

Morning all, I am attempting to load a package from a Solaris 8 CDROM. This fails with the error : "pkgadd: ERROR: unable to access pkgmap file </cdrom/ .........../SUNWlibC/pkgmap> No changes were made to the system" Any help would be appreciated Andy (6 Replies)
Discussion started by: AndyD
6 Replies

6. UNIX and Linux Applications

upgrade to solaris 9 - mysql impact

I have 4 solaris 8 servers running mysql 5.0.22. I am considering upgrading to solaris 9 and wanted to know if mysql needs to be recompiled for mysql to run under solaris 9. Thank you (4 Replies)
Discussion started by: csgonan
4 Replies

7. Solaris

Remote CD woes

Good Day, I've remotely mounted a cdrom (no problems theere). The kicker is I can see the directories on the remote CD bout I can't see the files. What am I doing wrong? I'm logged in as root on both systems. All the permissions seem okay - what am I missing? Thanks (2 Replies)
Discussion started by: greg69
2 Replies

8. AIX

AIX 5.2 Upgrade Woes from ML1 to ML8

:confused: Hello, This week, I was tasked with updating the Maintenance Level from 1 to 8 on a pSeries 650 server running Aix 5.2. I used the alt_disk_install method via smit. Upon reboot after the upgrade, the LED reported back 0518 /USR MOUNT FAILED. We couldn't even get console access.... (9 Replies)
Discussion started by: Darth1970vader
9 Replies

9. UNIX for Dummies Questions & Answers

CDROM Woes

Have a Sun CDROM connected to a Ultra machine . Problem is it is not recognizing the drive being connected to it ... When i put the CD in the drive it accepts the CD and zooms initially then quitens out .. The devices drivers are also not created for it ... Any ideas anyone ... I am... (4 Replies)
Discussion started by: Jai
4 Replies
Login or Register to Ask a Question