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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.