DATE_FORMAT in filtered recordset
I am having trouble formatting the date with php/MySQL in a filtered recordset. I am looking at the tutorial on http://forums.adobe.com/thread/450108 which shows how to do it. I've gotten it to work for a regular query but it sends back errors when I try to insert it into a filtered recordset. Here is the code I am trying but it's not working.
$blog_id = "-1";
if (isset($_GET['blog_id'])) {
$blog_id = $_GET['blog_id'];
$query_blog_comments = sprintf("SELECT blog_id, blog, comment, display, DATE_FORMAT(date, '%W, %M %e, %Y') AS date_formatted FROM blog_comment WHERE blog_id = %s AND display = 1 ORDER BY blog_id ASC", GetSQLValueString($blog_id, "text"));
Please tell me how to format a date for a filtered recordset. Thanks!
Heya,
Try this code:
$blog_id = "-1";
if (isset($_GET['blog_id'])) {
$blog_id = $_GET['blog_id'];
$query_blog_comments = sprintf("SELECT
blog_id, blog, comment, display,
DATE_FORMAT(date, '%%W, %%M %%e, %%Y')
AS date_formatted
FROM blog_comment
WHERE blog_id = %s
AND display = 1
ORDER BY blog_id ASC",
GetSQLValueString($blog_id, "text"));
The difference is an extra '%' placed in each date variable of DATE_FORMAT
Similar Messages
-
How to define source value for filtered recordset (ASP)
Hi,
I'm using ASP & CS4. I have a search page which upon submission sends form parameters to a results page. The results page matches the search parameters to a recordset and returns the appropriate record/s.
How can I take one of the values from the returned filtered recordset (which wasn't one of the original variables/parameters), and use it as a value to filter another recordset from another table? Do I have to create a parameter from that value, or can it be done in a SQL statement?
Many thanksHow many results are returned from the first recordset? Where is the second recordset to be displayed?
If the first RS returns a single row and the second RS is displayed on the same page, you don't need to create anything. Just use the value of the column you want in the SQL statement. If you need to pass the value to another page, you can either set a session variable or pass the value in the querystring. -
DW CS3 - MS Access - ASP
I'm trying to learn how to create filters, and trying to filter a recordset with a dropdown menu. Here’s an example:
1. The db column to filter is called “Colors” and has duplicates of RED and BLUE.
2. My form method is GET with action set to the same page.
3. My dropdown menu is called “color” with items labels RED and BLUE, values RED and BLUE.
4. I bind a Request.Querystring named “color” to the dropdown menu.
5. I create a new recordset, filtering by URL Parameter “color”.
The test values of RED or BLUE return correctly, but using the dropdown menu in preview is not working. I'm sure I'm going about this all wrong, so any help is appreciated.Too much experimenting on the dropdown menu, so I've tried to create another simpler filtering method via a link with a URL parameter. Hopefully, I'm missing a simple step and the concept of filtering will all come together. (following instruction from DW3 The Missing Manual)
I created a page called FILTER_TEST.asp. Created a table with a repeat region for a recordset called "socks" with columns type and color. No filters. All records return fine.
Created a form with the method GET and action FILTER_TEST.asp. Typed the word "black" in the form, and linked it via property inspector file search with URL parameter ?color=black. Created another recordset called "color", filtering the color column by URL parameter color. All records return, but no filtering occurs via the link.
Here's the code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/myconnection.asp" -->
<%
Dim rs_socks
Dim rs_socks_cmd
Dim rs_socks_numRows
Set rs_socks_cmd = Server.CreateObject ("ADODB.Command")
rs_socks_cmd.ActiveConnection = MM_myconnection_STRING
rs_socks_cmd.CommandText = "SELECT * FROM tbl_apparel"
rs_socks_cmd.Prepared = true
Set rs_socks = rs_socks_cmd.Execute
rs_socks_numRows = 0
%>
<%
Dim rs_color__MMColParam
rs_color__MMColParam = "1"
If (Request.QueryString("color") <> "") Then
rs_color__MMColParam = Request.QueryString("color")
End If
%>
<%
Dim rs_color
Dim rs_color_cmd
Dim rs_color_numRows
Set rs_color_cmd = Server.CreateObject ("ADODB.Command")
rs_color_cmd.ActiveConnection = MM_myconnection_STRING
rs_color_cmd.CommandText = "SELECT * FROM tbl_apparel WHERE color = ?"
rs_color_cmd.Prepared = true
rs_color_cmd.Parameters.Append rs_color_cmd.CreateParameter("param1", 200, 1, 255, rs_color__MMColParam) ' adVarChar
Set rs_color = rs_color_cmd.Execute
rs_color_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
rs_socks_numRows = rs_socks_numRows + Repeat1__numRows
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<div align="center">
<form id="form1" name="form1" method="get" action="FILTER_TEST.asp">
<a href="FILTER_TEST.asp?color=black">black</a>
</form>
<table cellpadding="5">
<tr>
<th scope="col">SOCK TYPE</th>
<th scope="col">COLOR</th>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT rs_socks.EOF))
%>
<tr>
<td><div align="left"><%=(rs_socks.Fields.Item("socks").Value)%></div></td>
<td><div align="left"><%=(rs_socks.Fields.Item("color").Value)%></div></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rs_socks.MoveNext()
Wend
%>
</table>
</div>
</body>
</html>
<%
rs_socks.Close()
Set rs_socks = Nothing
%> -
Filtering recordset with session variable
This has never happened to me before, but for some reason, my
recordset that drives a dynamic table won't filter results based on
a session variable. I know session variables are working because I
have the session variable echo on the page (dragged-n-dropped my
session variable from the Bindings panel to my page), and that
works fine. So why can't I filter my recordset with the same
session variable??? What's going on?
PS: I've attached my result page's code to this
message.Actually, problem solved. I moved " session_start()" above
"$colname_rsSales = "-1" ", which did the trick. -
DW CS3 - Access - ASP VBScript
I'm still learning SQL and trying to figure out how to filter down a recordset using parameters. I want to filter one recordset twice in a specific order. My first filter would pull records based on an item clicked from a form entitled "type".
VIEW TYPE: itemA | itemB | itemC
My second filter would pull records within the first set of records from a form entitled "search" (textfield keyword search). All data is retrieved on the same page using method GET. I'm using parameters for both forms, similar to the following example (I know the operator is incorrect). Maybe my approach is infeasible? None of my books or tutorials help since I'm not sure what to look for in order to do this, so any help would be appreciated.
SEACH Gender, Color, Type, Details
FROM myTable
WHERE Type LIKE %MMColParam% AND Details LIKE %MMColParam2%
MMColParam
Text
Request.Querystring.("type")
MMColParam2
Text
Request.Querystring("search")
Message was edited by: christinettNo other forms.
I have a similar db and page I've used as my experiment for SOCKS. It is doing the exact same thing. Here's the code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../Connections/myconnection.asp" -->
<%
Dim rs_socks__MMColParam
rs_socks__MMColParam = "M"
If (Request.Querystring("gender") <> "") Then
rs_socks__MMColParam = Request.Querystring("gender")
End If
%>
<%
Dim rs_socks__MMColParam2
rs_socks__MMColParam2 = "%"
If (Request.Querystring("search") <> "") Then
rs_socks__MMColParam2 = Request.Querystring("search")
End If
%>
<%
Dim rs_socks
Dim rs_socks_cmd
Dim rs_socks_numRows
Set rs_socks_cmd = Server.CreateObject ("ADODB.Command")
rs_socks_cmd.ActiveConnection = MM_myconnection_STRING
rs_socks_cmd.CommandText = "SELECT * FROM tbl_apparel WHERE gender = ? AND details LIKE ?"
rs_socks_cmd.Prepared = true
rs_socks_cmd.Parameters.Append rs_socks_cmd.CreateParameter("param1", 200, 1, 255, rs_socks__MMColParam) ' adVarChar
rs_socks_cmd.Parameters.Append rs_socks_cmd.CreateParameter("param2", 200, 1, 255, "%" + rs_socks__MMColParam2 + "%") ' adVarChar
Set rs_socks = rs_socks_cmd.Execute
rs_socks_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
rs_socks_numRows = rs_socks_numRows + Repeat1__numRows
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<div align="center">
<p>SOCKS</p>
show socks for this gender: <a href="../FilterTests/FILTER_TEST6.asp?gender=M">male</a> |<a href="../FilterTests/FILTER_TEST6.asp?gender=F"> female</a> | <a href="../FilterTests/FILTER_TEST6.asp?gender=anyone">anyone</a>
<form id="search" name="search" method="get" action="../FilterTests/FILTER_TEST6.asp?gender="<%=Request.QueryString("gender") %>">
<p>search in above category for:
<input name="search" type="text" id="search" value="<%= Request.QueryString("search") %>" />
<input type="submit" value="search" />
<a href="../FilterTests/FILTER_TEST6.asp">reset all</a></p>
</form>
<table cellpadding="5">
<tr>
<th scope="col">TYPE</th>
<th scope="col">GENDER</th>
<th scope="col">COLOR</th>
<th scope="col">DETAILS</th>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT rs_socks.EOF))
%>
<tr>
<td><div align="center"><%=(rs_socks.Fields.Item("socks").Value)%></div></td>
<td><div align="center"><%=(rs_socks.Fields.Item("gender").Value)%></div></td>
<td><div align="center"><%=(rs_socks.Fields.Item("color").Value)%></div></td>
<td><div align="left"><%=(rs_socks.Fields.Item("details").Value)%></div></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rs_socks.MoveNext()
Wend
%>
</table>
</div>
</body>
</html>
<%
rs_socks.Close()
Set rs_socks = Nothing
%> -
Error In MySQL Query With DATE_FORMAT
this produses an empty query when it shouldn't. I've made some error when using DATE_FORMAT and filtering by MONTH and YEAR but not sure how to fix it:
mysql_select_db($database_VALUATIONS, $VALUATIONS);
$query_valuations = sprintf("SELECT val_Trans_id, DATE_FORMAT(val_Date '%d-%m-%Y'), val_Company_Name, val_Company_Ref, val_Manufacturer, val_Model FROM valuations WHERE val_Company_Ref = %s AND MONTH(val_Date) = %s AND YEAR(val_Date) = %s ORDER BY val_Date DESC", GetSQLValueString($colname_valuations, "text"),GetSQLValueString($colname2_valuations, "text"),GetSQLValueString($colname3_valuations, "text"));
Thanks if anyone knows the answer ......I think that works as you say but I still can't get it to work with WHERE clauses for month and year, this tst works:
<?php require_once('Connections/tallon_admin.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
mysql_select_db($database_tallon_admin, $tallon_admin);
$query_Recordset1 = "SELECT DATE_FORMAT(val_Date, '%d-%m-%Y') as Date, val_Company_Name FROM valuations";
$Recordset1 = mysql_query($query_Recordset1, $tallon_admin) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Web Site</title>
</head>
<body>
<?php echo $row_Recordset1['Date']; ?> <br>
<br>
</body>
</html>
<?php
mysql_free_result($Recordset1);
mysql_free_result($mysql);
?>
I just can't get it working with a where clause to filter by month, this example returns an empty query when it shouldn't - also tried MONTH(val_Date) = %s
<?php require_once('Connections/tallon_admin.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
$colname_Recordset1 = "-1";
if (isset($_GET['month'])) {
$colname_Recordset1 = $_GET['month'];
mysql_select_db($database_tallon_admin, $tallon_admin);
$query_Recordset1 = sprintf("SELECT DATE_FORMAT(val_Date, '%d-%m-%Y') as Date, val_Company_Name FROM valuations WHERE MONTH(Date) = %s", GetSQLValueString($colname_Recordset1, "date"));
$Recordset1 = mysql_query($query_Recordset1, $tallon_admin) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Web Site</title>
</head>
<body>
<?php echo $row_Recordset1['Date']; ?> <br>
<br>
</body>
</html>
<?php
mysql_free_result($Recordset1);
mysql_free_result($mysql);
?> -
How do I display peronalized photo recordsets for seperate users after they have logged in?
Hi everyone,
I am using Dreamweaver CS3, MacBook Pro Leopard 10.5.6 and MAMP 1.7.
I have created a login system using the instructions from David Powers book The Essential Guide to Dreamweaver CS3, for a photgraphy website.
I have uploaded two pages from my login system login_success.php and username.php.
I am trying to achieve a situation where after the client has logged in successfully, they will be presented with a recordset of their own personal wedding photo's filtered from the image filenames in the database.
The username.php page is displaying one set of wedding photo's for client A, however when I click on client B's username listed in the list menu, then click the link for username.php, client A's photo recordset is still displaying, not client B.
How can I get the right photo recordset to display for the right client? Do I have to create separate recordsets for all of the different clients photos?
Please could someone help me with this, as I am going round in circles.
Thanks for your time.Heya,
read your thread title; got the just of your desire and disregarded your post. Use a filtered recordset filtered by session variable of MM_username to differentiate between logged in-users info displayed on page. So database table should have a column for username id and you simply filter your recordset based off the session variable of the user id and there you go - your recordset results will be displayed based off logged in users' id. -
DW8 No longer creates standard Recordsets
For what ever reason, I want to blame it on an extension, but
I seem to have two unique problems. The first is when I try to
creat a recordset (using a connectionless string) DW8.0.2 places :
<!--#include @@urlformat@@="Connections/connQuality.asp" -->
in the file. I have no idea why @@urlformat@@ is there in place of
: file
A standard non-filtered recordset looks like this now:
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows
Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_connQuality_STRING
Recordset1_cmd.CommandText = ""
Recordset1_cmd.Prepared = true
Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
I have tried everything I know and now am in need of other
Subject Matter Experts.
i believe these are two problems and not one. the connection
problem seems to be a result of a InterAKT extension that I added
and have sinxce removed. Their website referred to a patch, but it
is offline. I am more concerned about the recordset issue....there
is not definition to the details of the table. Is it a SQL RS and
if so how do I neutralize it....
Feedback welcome:
Thank you,
garyI am experiencing the exact problem :(
HELP! -
I'm not well versed in ASP. I have one page where I have 3
regions Two are recordsets. THe other is text that says "sorry no
items at this time" THe two recordsets are filtered by the URL
parameter. the recordsets show up correctly when the parameter is
passed. THe "sorry no items at this time" brings up the error:
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been
deleted. Requested operation requires a current record.
IS there a way to get these 3 items to work together using IF
<% If rsAllType.EOF And rsAllType.BOF Then %>
<div><p>
<span class="subtitle">
<%=(rsAllCourses.Fields.Item("Type").Value)%> <%=(rsAllCourses.Fields.Item("SubType").Val ue)%>
Courses
</span><br /><br />
<% While ((Repeat4__numRows <> 0) AND (NOT
rsAllCourses.EOF)) %>
<span class="boldgray">
<a href="CourseDetail.asp?<%=
Server.HTMLEncode(MM_keepURL) & MM_joinChar(MM_keepURL) &
"CourseID=" & rsAllCourses.Fields.Item("CourseID").Value
%>">
<%=(rsAllCourses.Fields.Item("Title").Value)%></a></span>
<br />
<%=(rsAllCourses.Fields.Item("Description").Value)%><br
/>
<span
class="bold">Prerequisites: </span><%=(rsAllCourses.Fields.Item("Prerequisites").Value)%>
<br /><br />
<% Repeat4__index=Repeat4__index+1
Repeat4__numRows=Repeat4__numRows-1
rsAllCourses.MoveNext()
Wend %>
</p></div>
<% End If ' end rsAllType.EOF And rsAllType.BOF %>
<% If rsAllCourses.EOF And rsAllCourses.BOF Then %>
<div>
<span
class="subtitle"><%=(rsType.Fields.Item("Type").Value)%> <%=(rsSubType.Fields.Item("SubTy pe").Value)%>
Courses</span><br />
<br />
No classes at this time, please check back soon. <br
/>
</p>
</div>
<% End If ' end rsAllCourses.EOF And rsAllCourses.BOF
%>
<% If Not rsAllType.EOF Or Not rsAllType.BOF Then %>
<p>
<span class="subtitle">All
Courses</span><span class="boldgray"> <br />
<br />
Listed
Alphabetically</span> <a
href="<%=MM_movePrev%>"><< Previous</a> <a
href="<%=MM_moveNext%>">Next >></a><br
/>
<br />
</p>
<%
While ((Repeat5__numRows <> 0) AND (NOT rsAllType.EOF))
%>
<div>
<p>
<span class="boldgreen">
<%=(rsAllType.Fields.Item("Title").Value)%></span><br
/>
<%=(rsAllType.Fields.Item("Description").Value)%><br />
<span
class="bold">Prerequisites: </span><%=(rsAllType.Fields.Item("Prerequisites").Value)%><br
/>
<span
class="bold">Category: </span><%=(rsAllType.Fields.Item("Type").Value)%><br
/>
<span
class="bold">Curriculum:</span><%=(rsAllType.Fields.Item("SubType").Value)%><br
/>
<br /></p>
</div>
<% Repeat5__index=Repeat5__index+1
Repeat5__numRows=Repeat5__numRows-1
rsAllType.MoveNext()
Wend %>
<% End If ' end Not rsAllType.EOF Or NOT rsAllType.BOF
%>redant34jessica wrote:
> If AllCourses NOT empty display AllCourses (there are
links on page to display
> this filtered recordset using URL Parameter - "TypeID")
<% If Not rsAllCourses.EOF Or Not rsAllCourses.BOF Then
%>
> If AllCourses empty and AllTypes NOT empty show AllTypes
(there is a link on
> page to display ALL using a URL Parameter- "Type")
If (rsAllCourses.EOF AND rsAllCourses.BOF) AND (NOT
rsAllTypes.EOF OR
NOT rsAllTypes.BOF) Then %>
> If AllCourses empty and AllTypes empty show warning
message (If there is no
> data a link on page where there is currently no data)
<% If rsAllCourses.EOF And rsAllCourses.BOF AND
rsAllTypes.EOF And
rsAllTypes.BOF Then %>
> Another Question is when a recordset is filtered by a
URL parameter, if that
> URL parameter does not exist in the URL is the recordset
EMPTY??
That depends on what you set the default value to be. I try
to use a
value that will never be used, like -1, so when the URL
parameter
doesn't exist, the recordset uses -1 instead. It won't find a
record
with -1 as the value, so returns an empty recordset.
> Please help. THank you very much!
See how you get on with the above.
Dooza
Posting Guidelines
http://www.adobe.com/support/forums/guidelines.html
How To Ask Smart Questions
http://www.catb.org/esr/faqs/smart-questions.html
How To Report A Bug To Adobe
http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform -
Show region if empty not working (ASP)
I have created an app in ASP (not .NET) to record some supplier stock info, with a summary page displaying a filtered recordset based upon the logged in user which is working fine and dandy... the problem lies when no records exist for the current user the summary page is coming back with the standard ASP, ADO error meaning no records exist: -
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record.
So I have tried adding "show region" behaviors to show a "no records exist" message and hiding the table containing the summary info, but the above error is still showing when I would only expect the "no records exist" message to display... page code as follows, all help appreciated..!
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
' *** Logout the current user.
MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1"
If (CStr(Request("MM_Logoutnow")) = "1") Then
Session.Contents.Remove("MM_Username")
Session.Contents.Remove("MM_UserAuthorization")
MM_logoutRedirectPage = "index.asp"
' redirect with URL parameters (remove the "MM_Logoutnow" query param).
if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL"))
If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_newQS = "?"
For Each Item In Request.QueryString
If (Item <> "MM_Logoutnow") Then
If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&"
MM_newQS = MM_newQS & Item & "=" & Server.URLencode(Request.QueryString(Item))
End If
Next
if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS
End If
Response.Redirect(MM_logoutRedirectPage)
End If
%>
<!--#include file="Connections/StockLevels.asp" -->
<%
' *** Restrict Access To Page: Grant or deny access to this page
MM_authorizedUsers=""
MM_authFailedURL="index.asp"
MM_grantAccess=false
If Session("MM_Username") <> "" Then
If (true Or CStr(Session("MM_UserAuthorization"))="") Or _
(InStr(1,MM_authorizedUsers,Session("MM_UserAuthorization"))>=1) Then
MM_grantAccess = true
End If
End If
If Not MM_grantAccess Then
MM_qsChar = "?"
If (InStr(1,MM_authFailedURL,"?") >= 1) Then MM_qsChar = "&"
MM_referrer = Request.ServerVariables("URL")
if (Len(Request.QueryString()) > 0) Then MM_referrer = MM_referrer & "?" & Request.QueryString()
MM_authFailedURL = MM_authFailedURL & MM_qsChar & "accessdenied=" & Server.URLEncode(MM_referrer)
Response.Redirect(MM_authFailedURL)
End If
%>
<%
if Session("MM_Username")="" then
Response.Redirect("index.asp")
end if
%>
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Session("MM_Username") <> "") Then
Recordset1__MMColParam = Session("MM_Username")
End If
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows
Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_StockLevels_STRING
Recordset1_cmd.CommandText = "SELECT * FROM AULWEB.TESTP12 WHERE SNAM12 = ? ORDER BY VNDR12 ASC"
Recordset1_cmd.Prepared = true
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 200, 1, 15, Recordset1__MMColParam) ' adVarChar
Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 10
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim Recordset1_total
Dim Recordset1_first
Dim Recordset1_last
' set the record count
Recordset1_total = Recordset1.RecordCount
' set the number of rows displayed on this page
If (Recordset1_numRows < 0) Then
Recordset1_numRows = Recordset1_total
Elseif (Recordset1_numRows = 0) Then
Recordset1_numRows = 1
End If
' set the first and last displayed record
Recordset1_first = 1
Recordset1_last = Recordset1_first + Recordset1_numRows - 1
' if we have the correct record count, check the other stats
If (Recordset1_total <> -1) Then
If (Recordset1_first > Recordset1_total) Then
Recordset1_first = Recordset1_total
End If
If (Recordset1_last > Recordset1_total) Then
Recordset1_last = Recordset1_total
End If
If (Recordset1_numRows > Recordset1_total) Then
Recordset1_numRows = Recordset1_total
End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (Recordset1_total = -1) Then
' count the total records by iterating through the recordset
Recordset1_total=0
While (Not Recordset1.EOF)
Recordset1_total = Recordset1_total + 1
Recordset1.MoveNext
Wend
' reset the cursor to the beginning
If (Recordset1.CursorType > 0) Then
Recordset1.MoveFirst
Else
Recordset1.Requery
End If
' set the number of rows displayed on this page
If (Recordset1_numRows < 0 Or Recordset1_numRows > Recordset1_total) Then
Recordset1_numRows = Recordset1_total
End If
' set the first and last displayed record
Recordset1_first = 1
Recordset1_last = Recordset1_first + Recordset1_numRows - 1
If (Recordset1_first > Recordset1_total) Then
Recordset1_first = Recordset1_total
End If
If (Recordset1_last > Recordset1_total) Then
Recordset1_last = Recordset1_total
End If
End If
%>
<%
Dim MM_paramName
%>
<%
' *** Move To Record and Go To Record: declare variables
Dim MM_rs
Dim MM_rsCount
Dim MM_size
Dim MM_uniqueCol
Dim MM_offset
Dim MM_atTotal
Dim MM_paramIsDefined
Dim MM_param
Dim MM_index
Set MM_rs = Recordset1
MM_rsCount = Recordset1_total
MM_size = Recordset1_numRows
MM_uniqueCol = ""
MM_paramName = ""
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName <> "") Then
MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
End If
%>
<%
' *** Move To Record: handle 'index' or 'offset' parameter
if (Not MM_paramIsDefined And MM_rsCount <> 0) then
' use index parameter if defined, otherwise use offset parameter
MM_param = Request.QueryString("index")
If (MM_param = "") Then
MM_param = Request.QueryString("offset")
End If
If (MM_param <> "") Then
MM_offset = Int(MM_param)
End If
' if we have a record count, check if we are past the end of the recordset
If (MM_rsCount <> -1) Then
If (MM_offset >= MM_rsCount Or MM_offset = -1) Then ' past end or move last
If ((MM_rsCount Mod MM_size) > 0) Then ' last page not a full repeat region
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If
' move the cursor to the selected record
MM_index = 0
While ((Not MM_rs.EOF) And (MM_index < MM_offset Or MM_offset = -1))
MM_rs.MoveNext
MM_index = MM_index + 1
Wend
If (MM_rs.EOF) Then
MM_offset = MM_index ' set MM_offset to the last possible record
End If
End If
%>
<%
' *** Move To Record: if we dont know the record count, check the display range
If (MM_rsCount = -1) Then
' walk to the end of the display range for this page
MM_index = MM_offset
While (Not MM_rs.EOF And (MM_size < 0 Or MM_index < MM_offset + MM_size))
MM_rs.MoveNext
MM_index = MM_index + 1
Wend
' if we walked off the end of the recordset, set MM_rsCount and MM_size
If (MM_rs.EOF) Then
MM_rsCount = MM_index
If (MM_size < 0 Or MM_size > MM_rsCount) Then
MM_size = MM_rsCount
End If
End If
' if we walked off the end, set the offset based on page size
If (MM_rs.EOF And Not MM_paramIsDefined) Then
If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
If ((MM_rsCount Mod MM_size) > 0) Then
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If
' reset the cursor to the beginning
If (MM_rs.CursorType > 0) Then
MM_rs.MoveFirst
Else
MM_rs.Requery
End If
' move the cursor to the selected record
MM_index = 0
While (Not MM_rs.EOF And MM_index < MM_offset)
MM_rs.MoveNext
MM_index = MM_index + 1
Wend
End If
%>
<%
' *** Move To Record: update recordset stats
' set the first and last displayed record
Recordset1_first = MM_offset + 1
Recordset1_last = MM_offset + MM_size
If (MM_rsCount <> -1) Then
If (Recordset1_first > MM_rsCount) Then
Recordset1_first = MM_rsCount
End If
If (Recordset1_last > MM_rsCount) Then
Recordset1_last = MM_rsCount
End If
End If
' set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth
Dim MM_removeList
Dim MM_item
Dim MM_nextItem
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If
MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""
' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
End If
Next
' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
End If
Next
' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then
MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "") Then
MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> "") Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%>
<%
' *** Move To Record: set the strings for the first, last, next, and previous links
Dim MM_keepMove
Dim MM_moveParam
Dim MM_moveFirst
Dim MM_moveLast
Dim MM_moveNext
Dim MM_movePrev
Dim MM_urlStr
Dim MM_paramList
Dim MM_paramIndex
Dim MM_nextParam
MM_keepMove = MM_keepBoth
MM_moveParam = "index"
' if the page has a repeated region, remove 'offset' from the maintained parameters
If (MM_size > 1) Then
MM_moveParam = "offset"
If (MM_keepMove <> "") Then
MM_paramList = Split(MM_keepMove, "&")
MM_keepMove = ""
For MM_paramIndex = 0 To UBound(MM_paramList)
MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=") - 1)
If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then
MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)
End If
Next
If (MM_keepMove <> "") Then
MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
End If
End If
End If
' set the strings for the move to links
If (MM_keepMove <> "") Then
MM_keepMove = Server.HTMLEncode(MM_keepMove) & "&"
End If
MM_urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="
MM_moveFirst = MM_urlStr & "0"
MM_moveLast = MM_urlStr & "-1"
MM_moveNext = MM_urlStr & CStr(MM_offset + MM_size)
If (MM_offset - MM_size < 0) Then
MM_movePrev = MM_urlStr & "0"
Else
MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)
End If
%>
<% Session ("accountname") = Recordset1.Fields.Item("SNAM12").Value%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>S2N part stock summary</title>
<link href="Style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="352"><img src="Assets/invertednifco.jpg" alt="Nifco logo" width="199" height="55" longdesc="http://www.nifcoeu.com" /></td>
<td width="34%"> </td>
<td width="352" align="right" valign="top" class="style23"><p>Logged in as:
<%Response.Write(Session("MM_Username"))%>
<br />
<a href="<%= MM_Logout %>">Logout</a></p></td>
</tr>
<tr>
<td width="352" valign="bottom"><img src="Assets/horizontal_grey_line.jpg" alt="grey line" width="352" height="5" /></td>
<td> </td>
<td width="352"> </td>
</tr>
<tr>
<td width="352" class="style4"><span class="nifco_banner_txt">NI</span><span class="style21"><span class="nifcoF">f</span></span><span class="nifco_banner_txt">CO UK LIMITED</span></td>
<td> </td>
<td width="352"> </td>
</tr>
<tr>
<td width="352" height="52" class="style4"> </td>
<td> </td>
<td width="352"> </td>
</tr>
<tr>
<td colspan="3" align="center" valign="middle"><table width="99%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000">
<tr>
<td><div align="center">
<h5 align="center">Your part number</h5>
</div></td>
<td><div align="center">
<h5 align="center">Nifco part number</h5>
</div></td>
<td><div align="center">
<h5 align="center">Part description</h5>
</div></td>
<td><div align="center">
<h5 align="center">Actual stock</h5>
</div></td>
<td><div align="center">
<h5 align="center">Stock on Order</h5>
</div></td>
<td><div align="center">
<h5 align="center">Stock in Transit</h5>
</div></td>
<td><div align="center">
<h5 align="center">UOM</h5>
</div></td>
<td><div>
<h5 align="center">Nifco specific part</h5>
</div></td>
<td><h5> </h5></td>
<td> </td>
</tr>
<%
Dim RecordCounter
RecordCounter = 0
%>
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<% If Not Recordset1.EOF Or Not Recordset1.BOF Then %>
<tr bgcolor=
"<%
RecordCounter = RecordCounter + 1
If RecordCounter Mod 2 = 1 Then
Response.Write "#999999"
End If
%>"
>
<td><div>
<p align="center"><%=(Recordset1.Fields.Item("VNDR12").Value)%> </p>
</div></td>
<td><div>
<p align="center"><%=(Recordset1.Fields.Item("PNUM12").Value)%> </p>
</div></td>
<td><div>
<p align="center"><%=(Recordset1.Fields.Item("PDES12").Value)%></p>
</div></td>
<td><div>
<p align="center"><%=(Recordset1.Fields.Item("ASTK12").Value)%> </p>
</div></td>
<td><div>
<p align="center"><%=(Recordset1.Fields.Item("OSTK12").Value)%></p>
</div></td>
<td><div>
<p align="center"><%=(Recordset1.Fields.Item("ISTK12").Value)%></p>
</div></td>
<td><div>
<p align="center"><%=(Recordset1.Fields.Item("UOFM12").Value)%></p>
</div></td>
<td width="26"><div align="center"><%=(Recordset1.Fields.Item("NIFC12").Value)%></div></td>
<td width="26"><p><a href="update.asp?<%= Server.HTMLEncode(MM_keepURL) & MM_joinChar(MM_keepURL) & "VNDR12=" & Recordset1.Fields.Item("VNDR12").Value %>">Edit</a></p></td>
<td width="45"><p align="center"><a href="delete.asp?VNDR12=<%=(Recordset1.Fields.Item("VNDR12").Value)%>">Delete</a></p></td>
</tr>
<% End If ' end Not Recordset1.EOF Or NOT Recordset1.BOF %>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
</table>
<p> </p></td>
</tr>
<tr>
<td width="352"> </td>
<td><div align="center">
<table border="0">
<tr>
<td><% If MM_offset <> 0 Then %>
<a href="<%=MM_moveFirst%>">First</a>
<% End If ' end MM_offset <> 0 %> </td>
<td><% If MM_offset <> 0 Then %>
<a href="<%=MM_movePrev%>">Previous</a>
<% End If ' end MM_offset <> 0 %> </td>
<td><% If Not MM_atTotal Then %>
<a href="<%=MM_moveNext%>">Next</a>
<% End If ' end Not MM_atTotal %> </td>
<td><% If Not MM_atTotal Then %>
<a href="<%=MM_moveLast%>">Last</a>
<% End If ' end Not MM_atTotal %> </td>
</tr>
</table>
</div> <p align="center"> Records <%=(Recordset1_first)%> to <%=(Recordset1_last)%> of <%=(Recordset1_total)%></p></td>
<td width="352" height="52" align="right" valign="bottom"> </td>
</tr>
<tr>
<td width="352" align="center"><a href="newpart.asp">Register a new part</a></td>
<td><% If Recordset1.EOF And Recordset1.BOF Then %>
<div align="center">
<h5>I'm sorry, no records found.<br />
<input type="button" name="btnCancel" value="Go back!" onclick="history.back()"/>
</h5>
</div>
<% End If ' end Recordset1.EOF And Recordset1.BOF %></td>
<td width="352" align="right" valign="bottom"><img src="Assets/horizontal_grey_line.jpg" alt="grey line" width="353" height="5" /></td>
</tr>
<tr>
<td width="352"> </td>
<td> </td>
<td width="352"><div align="left"><span class="nifco_banner_txt">NI</span><span class="nifcoF">f</span><span class="style21"><span class="nifco_banner_txt">CO UK LIMITED</span></span></div></td>
</tr>
<tr>
<td colspan="3"><div align="center" class="p_text">Nifco Supplier Stock Management System</div></td>
</tr>
</table>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>It depends on the markup situation, for example if your
images are *not* wrapped in a container element that contains just
the image, then I would do something like this:
<img spry:if="'{boximage}' != '' &&
'{boximage}' != 'undefined'" src="{boximage}" />
<img spry:if="'{boximage}' == '' || '{boximage}' ==
'undefined'" src="MissingImage.jpg" />
Or in the case of the products demo where we have an image in
a <p> I would use a spry:choose:
<p spry:choose="choose">
<img spry:when="'{boximage}' != '' &&
'{boximage}' != 'undefined'" src="{boximage}" />
<img spry:default="default" src="MissingImage.jpg" />
</p>
Using spry:choose where you can is better because it means
the region processing code has one less conditional expression to
evaluate since the default case has no expression associated with
it.
--== Kin ==-- -
I have been studying sql injection attacks and the
mysql_real_escape function.
I read the adobe technote about sql injection and it noted
that Dreamweaver 8.0 incorporates anti-sql injection code to
prevent attacks and it specifically refers to Add, Delete, and
Update; Filtered Recordsets, and Login User server behaviors. Can
anyone please confirm this to put my mind at ease?
The Search form and results page uses a filtered recordset,
so can I presume that it is guarded from attack?
Can you tell me of any areas that I need to add anti-sql
injection code myself?
Thank you so much for your help!EviePhillips wrote:
> The code on this second page (the one where the form
posts to) ECHOs the form
> variables. Do I need to enter the
mysql_real_escape_string around each of the
> ECHOed posted form variables?
No, mysql_real_escape_string() is used only when inserting
user input
values into a database. You cannot use it without a database
connection.
However, you should pass the values to htmlentitities()
before
displaying them in your page. You can do this by accessing
the Format
menu in the Dynamic Text dialog box. After using the Bindings
panel to
insert the value, switch to the Server Behaviors panel, and
double-click
the Dynamic Text entry to open the dialog box.
> I am then going to use the ADD Record server behavior to
add the data to my
> database from this page, which based on your counsel is
fully protected from
> sql injection.
>
> You are very kind for sharing your knowledge!
> EP
>
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS4",
"PHP Solutions" & "PHP Object-Oriented Solutions"
http://foundationphp.com/ -
This is a weird one!!!
I am using Dreamweaver/php/mysql and I am in the process of
developing the forms that edit articles that have been added to the
CMS. I have a page called edit.php which has the current list of
articles. Each article has a radio button next to it and have given
it an id of "id" (which is what I called it in the DB). On
selecting this article, and hitting submit, this should load up a
editnews2.php. On editnews2.php I have a filtered recordset that
filters on "id " so that it loads the article selected into the
editnews2 form. I have bound the fields in the form to the related
fields in the recordset.
When I test this out using the TEST button, in the recordset
pop-up window and enter an id, it retrieves the correct article
from the database. However, when I do it using the forms, I get an
error:
"You have an error in your SQL syntax; check the manual that
corresponds to your Mysql server version for the right syntax to
use near " at line 1"
This is really weird because the recordset works and
retreives the data no problems, which mean the connection file path
is correct and other parameters are correct. I have tried lots of
times to try and figure this out but I am now really stuck.
Could anyone shed some light on this one?
regards
orange22orange22 wrote:
> When I test this out using the TEST button, in the
recordset pop-up window and
> enter an id, it retrieves the correct article from the
database. However, when
> I do it using the forms, I get an error:
>
> "You have an error in your SQL syntax; check the manual
that corresponds to
> your Mysql server version for the right syntax to use
near " at line 1"
What that means is that the way Dreamweaver is building your
query
contains a mistake - probably an extra quotation mark or
something like
that.
Go into Code view and use echo to display the actual SQL
query being
sent to the database. That will give you a clue as to where
to start
troubleshooting the rest of the code.
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of
ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/ -
Query based on a dropdown list (query)
Hello
I have a dropdown list (populated with data from a query)
mysql_select_db($database_myconnection, $myconnection);
$query_groepen = "SELECT * FROM artikelgroepen ORDER BY groepomschrijving ASC";
$groepen = mysql_query($query_groepen, $myconnection) or die(mysql_error());
$row_groepen = mysql_fetch_assoc($groepen);
$totalRows_groepen = mysql_num_rows($groepen);
Now I want to show on the webpage all articles which are part of the article-group that I have selected from the above mentioned list (query)
Which parameter do I have to use in the query which follows :
mysql_select_db($database_myconnection, $myconnection);
$query_artikelen = "SELECT * FROM artikelen WHERE groep ???????????";
$artikelen = mysql_query($query_artikelen, $myconnection) or die(mysql_error());
$row_artikelen = mysql_fetch_assoc($artikelen);
$totalRows_artikelen = mysql_num_rows($artikelen);
Thank you for your repliesSorry, I don't have the time to script it for you. As I said before, you need to submit the form and use a URL parameter to display the result. This is the same principle as any filtered recordset.
Put your drop-down list in a form with the method set to GET.
In the second recordset, use the name of the drop-down menu as a URL parameter to filter the SQL query. (See the following Help page: http://help.adobe.com/en_US/dreamweaver/cs/using/WSc78c5058ca073340dcda9110b1f693f21-799da .html). -
Search Engine Friendly URL Rewriting
Hi,
Has anyone done any kind of URL rewriting to convert the big, query ridden portal
URLs to search engine friendly URLs?
eg. Portal URL: http://somedomain/application?event=blah&pageID=blah&blah=blahblahblah
gets converted to
http://somedomain/pageID/page.htm or something like that.
Any help will be appreciated.
Thanks,
ParagFilter your recordset based off text values for your table fields ex. field 'model' will have values Honda, Toyota, Suzuki, etc. and field 'color' will have values red, blue, green. etc.
The filtered URL will be www.example.com/?model=Honda&color=red to show all red Hondas in the filtered recordset.
Using .htacces mod_rewrite you can convert the above example to something like www.example.com/red/honda.html
http://corz.org/serv/tricks/htaccess2.php -
Display SWFs instead of images?
Hi all,
I built some dynamic pages using ADDT, and on some of the pages, the customer wants .swf files to display instead of an image. I added a field in my mysql database that holds the path to the flash files (for example...."flash/file-1.swf"), and then I tried to put a "placeholder" and bind the field from the recordset I created. However, this didnt work.
Is there a way to pull and place an swf onto a dynamic page like this? What am I doing wrong?
Any help is appreciated
JohnHi Shane,
I didnt think it would be hard to do either, and maybe its just because I am juggling 5 other projects that I dont have the focus right now and its making this more difficult.
Ok, I can post code but Ill tell you what I did. I created several flash files for each page (i.e. 1.swf, 2.swf, 3.swf, etc) and then in my MySQL database, I added a field to hold the path to those files for each page.
In my page I created a filtered recordset. I place in the swf file where i wanted it and then went to the file field (this is in Dreamweaver) then opened the dialog box. Then I hit "Data Sources" and selected the correct field from my recordset that holds the path in the db.
When I got to test the page, nothing comes up where the swf should be. When I look at the code, it is correctly bringing up the source from the database, its just not showing the file.
Any ideas?
Maybe you are looking for
-
iTunes cannot add any songs to the iPad "Fernando Velazquez Ipad" because no songs in the playlist "Purchased" can be copied to this iPad.
-
I downloaded Jdeveloper 11 and noticed The System Navigator under view is missing. Thanks
-
CS5 Master Collection trial installs without Acrobat on 64-bit?
Hi guys, This is a bit weird but I installed Creative Suite 5 Master Collection (trial) the other day on my PC (newly re-installed with Windows 7 64-bit) and for some reason there is no trace of Acrobat! I Googled this yeaterday and found a few other
-
Socket conn = serverSocket.accept(); // Process in another thread ServerThread srvT= new ServerThread(args ,conn, i); srvT.start(); my problem is when the thread started conn become null i checked the program and the class varient become null only wh
-
Hi I have created a slideshow in iPhoto & exported to iDVD. I then burned to DVD, however when I watch on a TV or through computer DVD player the following occurs: 1. Pictures do not fit on screen and titles are only half visible; 2. The picture tran