Jump to content


Photo

recordset - Image-Text - problem


  • Please log in to reply
3 replies to this topic

#1 Daniel_Johns

Daniel_Johns
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 30 September 2004 - 12:40 PM

Hi all! Im using Dreamweaver 204 MX with MySQL 4.01 and PHP 5 installed and working properly. I have come to try PHP using DW. I created a simple-sample site which would only fetch data out of MySQL db.

DB name is Sample.
Table name is Contacts.
Fields are IDNo, LastName, FirstName, Address and Photo (a mediumblob type)

I tried showing the following records in DW style (drag-drop-fields-from-recordset) then it only shows the text fields (IDNo, LastName, FirstName and Address) but not the Photo column (in which DW doesnt support this feature it says...)

I override DW code and the photo shows...the real problem is the text wont show when I load the photo first and when the text is shown first, the photo wont load. Any solution with this simple problem (i think its simple for those who are guru...) thanks in advance and it will be a great help for a begginner like me. Thanks again.

#2 morpheus.100

morpheus.100
  • Members
  • PipPipPip
  • Advanced Member
  • 145 posts

Posted 30 September 2004 - 08:33 PM

Post some code and lets see whats going on.

#3 Daniel_Johns

Daniel_Johns
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 05 October 2004 - 11:29 AM

<?php
{


@MYSQL_CONNECT("localhost","tester","test");

@mysql_select_db("sample");

$query = "select Photo, Lastname, Firstname from contacts where Id=5";
$result = @MYSQL_QUERY($query);


$data = @MYSQL_RESULT($result,0,"Photo");
$LName = @MYSQL_RESULT($result,0,"Lastname");
$FName = @MYSQL_RESULT($result,0,"Firstname");


echo $data;
echo $LName;
echo $FName;

}
?>
<html>
<body>
<p>
<img src="getdata.php">
</body>
</html>

#4 Daniel_Johns

Daniel_Johns
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 05 October 2004 - 11:30 AM

sorry for the delay, busy on work. btw, this is the code im testing. thnx for the help.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users