Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

asp to php info

Guest
Jan 22, 2008 Jan 22, 2008

Copy link to clipboard

Copied

ASP:

<%
if Request.QueryString("affid") <> "" then

set rsAffiliateClicks = Server.CreateObject("ADODB.Recordset")
rsAffiliateClicks.ActiveConnection = MM_cnConnection_STRING
rsAffiliateClicks.Source = "SELECT id, date, affid, referURL FROM affiliateClicks"
rsAffiliateClicks.CursorType = 0
rsAffiliateClicks.CursorLocation = 2
rsAffiliateClicks.LockType = 3
rsAffiliateClicks.Open()
rsAffiliateClicks_numRows = 0
rsAffiliateClicks.addnew

rsAffiliateClicks("date") = date()
rsAffiliateClicks("affid") = Request.QueryString("affid")
rsAffiliateClicks("referURL") = Request.ServerVariables("HTTP_REFERER")

rsAffiliateClicks.update
rsAffiliateClicks.close
end if
%>

PHP:?
How do I initiate the update and addition of a record in the database from within the recordset as I have done here in ASP.


TOPICS
Server side applications

Views

486
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 24, 2008 Jan 24, 2008

Copy link to clipboard

Copied

Is this not something you can do in PHP?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 25, 2008 Jan 25, 2008

Copy link to clipboard

Copied



"jsteinmann" <webforumsuser@macromedia.com> wrote in message
news:fn4a15$hp3$1@forums.macromedia.com...
> ASP:
>
> <%
> if Request.QueryString("affid") <> "" then
>
> set rsAffiliateClicks = Server.CreateObject("ADODB.Recordset")
> rsAffiliateClicks.ActiveConnection = MM_cnConnection_STRING
> rsAffiliateClicks.Source = "SELECT id, date, affid, referURL FROM
> affiliateClicks"
> rsAffiliateClicks.CursorType = 0
> rsAffiliateClicks.CursorLocation = 2
> rsAffiliateClicks.LockType = 3
> rsAffiliateClicks.Open()
> rsAffiliateClicks_numRows = 0
> rsAffiliateClicks.addnew
>
> rsAffiliateClicks("date") = date()
> rsAffiliateClicks("affid") = Request.QueryString("affid")
> rsAffiliateClicks("referURL") = Request.ServerVariables("HTTP_REFERER")
>
> rsAffiliateClicks.update
> rsAffiliateClicks.close
> end if
> %>
>
> PHP:?
> How do I initiate the update and addition of a record in the database from
> within the recordset as I have done here in ASP.

To use similar syntax in PHP you can use the ADOdb PHP Database abstraction
layer,
InterAKT (who made the ADDT) have developed the dreamweaver extension phAKT
that adds a new server-model PHP ADODB to dreamweaver and replicates the
standard dreamweaver ServerBehaviors up to Dreamweaver 8, however after the
merger with adobe the project was discontinued and not available for
download anymore. Since the project was released under the LGPL licence I've
setup a project on sourceforge with the aim of continuing distribution and
possibly development of the phaKT server model, to differentiate this
project from the original version we deceided to name it openphakt.
You can access the project website and source code repository from
http://openphakt.sourceforge.net ; to download the MXP look in the SVN
repository under the release folder

While the goal of continued distribution has been reached, nobody has
reported bugs/issues to the sourceforge project and development hasn't
started yet. If you have questions about the project I would be happy to
answer them.

Joris van Lier

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 25, 2008 Jan 25, 2008

Copy link to clipboard

Copied

"jsteinmann" <webforumsuser@macromedia.com> wrote in message
news:fnaf5b$fp0$1@forums.macromedia.com...
> Is this not something you can do in PHP?

The magic word for this type of database interaction is "ActiveRecord"
I've posted a small example at
http://www.dmxzone.nl/showDetail.asp?TypeId=25&NewsId=12415

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 25, 2008 Jan 25, 2008

Copy link to clipboard

Copied

good luck with that.

i wonder what could be done in php as a work around, accomplishing the same thing but with mysql?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 26, 2008 Jan 26, 2008

Copy link to clipboard

Copied

LATEST
"jsteinmann" <webforumsuser@macromedia.com> wrote in message
news:fne6i0$qaf$1@forums.macromedia.com...
> good luck with that.
>
> i wonder what could be done in php as a work around, accomplishing the
> same thing but with mysql?

A lot can be done there are many activerecord implementations but none are
supported by dreamweaver afaik.

http://en.wikipedia.org/wiki/List_of_object-relational_mapping_software

There's a feature request for an object datasource serverbehavior which if
implemented could be used to provide UI support for ActiveRecord
implementations
http://sourceforge.net/tracker/index.php?func=detail&aid=1776864&group_id=201846&atid=979195




Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines