Jump to content

Catchable fatal error:


jkewlo

Recommended Posts

Hey everyone,

 

Ok i am working with a database with the fields Big and Small

 

the field(s) have Art1_Big.jpg and Art1.jpg

 

i have connection to the database and i am trying to call Art1_Big.jpg or Art1.jpg

 

Art1_Big.jpg and Art1.jpg are just text entered into the database being i dont under stand the OLE object thing.

 

well im not sure on what to do i keep getting

 

Catchable fatal error: Object of class variant could not be converted to string in C:\wamp\www\pro\project\viewmore.php on line 157

 

i have tried other ways to get it to work. but cant seem to get it i keep getting the same error i have googled the error with no luck as well

 

 

<?
	$url = $_REQUEST["id"];
	$conn = new COM('ADODB.Connection') or die('Could not make conn');
$rs = new COM('ADODB.Recordset') or die('Coult not make rs');

$connstring = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\\wamp\\www\\pro\\project\\Rainwater.mdb";

$conn->Open($connstring);
if (!$conn)
  {exit("Connection Failed: " . $conn);}
$sql="SELECT * 
FROM Books 
WHERE Product_id = '". $url ."'";
$rs->Open($sql, $conn);

?>

Line 157:      <img src="Pic/<? echo "". $rs->Fields['Big'] .""?>"></td>
        <td width="82" valign="top" bgcolor="#C6FC48">Price: <? echo "". $rs->Fields['Price'] . "" ?><br />
          Author:<? echo "". $rs->Fields['Author'] . "" ?></td>

 

Thanks in Advance

Link to comment
https://forums.phpfreaks.com/topic/96756-catchable-fatal-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.