Jump to content

recordset - Image-Text - problem


Recommended Posts

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.

Link to comment
Share on other sites

<?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>

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.