close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Image not dislaying error in SQL

Thread begun 10/22/2012 2:16 pm by jo271221 | Last modified 11/19/2012 1:59 pm by Jason Byrnes | 2730 views | 8 replies |

jo271221

Image not dislaying error in SQL

I created member directory and member pages using databassist. On the post detail page I would like to display the customers logo from the directory table if the post does not include an image. Here is my attempt and attached as well. _p_detailNEW.php?postid=9151 Here is the working page. p-detail.php?postid=9151 This postid 9151 does NOT have an image. postid 2822 DOES have a 1st image. postid 9151 should display the logo from their directory listing. Directory-Detail.php?id=909 I can see I have an error at line 60 but I don't know what it is.

Attached Files
WEBASSIST_p_detailNEW.pdf
Sign in to reply to this post

Jason ByrnesWebAssist

the error is happening because of the run time value you entered for the Paramid parameter of the directory recordset.

the run time value you used:
$_[GET]"id"


should be:

$_GET["id"]

Sign in to reply to this post

jo271221

Logo Image still not displaying

Thank You, the error is resolved but the customers logo is not displaying. I double checked and it is in the database and displays on their directory listing page. Directory-Detail.php?id=909 but it is still not displaying on the post detail page. _p_detailNEW.php?postid=9151. I put bound just the filename at the top of the page after the business name just to be sure it was not an image issue or show if issue and the file name does not appear either.

Sign in to reply to this post

Jason ByrnesWebAssist

the link the _p_detailNEW.php page is not passing a URL variable name d ID, it is passing postid.

_p_detailNEW.php?postid=9151



try using $_GET["postid"] as the run time value in your recordset.

Sign in to reply to this post

jo271221

Resolved!

That did it. Thank You!!!

Sign in to reply to this post

jo271221

not working

I am not sure how I broke this, but I just checked this page and the image is NOT displaying.
Here is the current code<?php
$Parampostid_WADAtbl_post = "-1";
if (isset($_GET['postid'])) {
$Parampostid_WADAtbl_post = $_GET['postid'];
}
$ParamSessionpostid_WADAtbl_post = "-1";
if (isset($_SESSION['WADA_Insert_tbl_posts'])) {
$ParamSessionpostid_WADAtbl_post = $_SESSION['WADA_Insert_tbl_posts'];
}
$Parampostid2_WADAtbl_post = "-1";
if (isset($_GET['postid'])) {
$Parampostid2_WADAtbl_post = $_GET['postid'];
}

mysql_select_db($database_community, $community);
$query_WADAtbl_post = sprintf("SELECT tbl_posts.*, listadforms.formfile FROM tbl_posts left join listadforms on tbl_posts.ad_category = listadforms.formid WHERE postid = %s OR ( -1= %s AND postid= %s)", GetSQLValueString($Parampostid_WADAtbl_post, "int"),GetSQLValueString($Parampostid2_WADAtbl_post, "int"),GetSQLValueString($ParamSessionpostid_WADAtbl_post, "int"));
$WADAtbl_post = mysql_query($query_WADAtbl_post, $community) or die(mysql_error());
$row_WADAtbl_post = mysql_fetch_assoc($WADAtbl_post);
$totalRows_WADAtbl_post = mysql_num_rows($WADAtbl_post);

$Paramid_directory = "-1";
if (isset($_GET['id'])) {
$Paramid_directory = $_GET['postid'];
}
mysql_select_db($database_community, $community);
$query_directory = sprintf("SELECT logo_img FROM tbl_directorylistings WHERE %s=id", GetSQLValueString($Paramid_directory, "int"));
$directory = mysql_query($query_directory, $community) or die(mysql_error());
$row_directory = mysql_fetch_assoc($directory);
$totalRows_directory = mysql_num_rows($directory);
?>

Page - _p_detailNEW.php?postid=9187

This user does have a logo - Directory-Detail.php?id=4334 top left image is the logo

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need the full page please in a zip archive to see the code in context.

Sign in to reply to this post

jo271221

Image and style sheet from member's profile

I have attached post detail and results page. In addition to getting the logo_img I also want to get the fldstylesheet to be bound on these pages. logo_img and fldstylesheet are in the table tbl_directorylistings, the pages are getting the rest of the information from tbl_post table.

Attached Files
styleAndimagefromtbl_directorylistings.zip
Sign in to reply to this post

Jason ByrnesWebAssist

your recordset is not querying the tbl_directorylistings table. it is only returning data from the tbl_posts and listadforms tables.

if you need to return data from the tbl_directorylistings table also, you will need to add that table to the recordset.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...