Phillip,

It looks like you're inserting a new row into the table each time, in
which case it'd only go to two.  What I think you mean to do is update
the row of the image returned by GetInfo3, in which case you'd want to
use an UPDATE statement.  Try this:


<cfquery datasource="applewood" name="Getinfo3">
SELECT *
FROM ImageData
WHERE ImageID = #ListRandImage#
</cfquery>

<cfquery DATASOURCE="#mydbname#" NAME="UpdateData">
UPDATE ImageData
SET PageViews = PageViews + 1,
  ImageShowDate = GetDate()
WHERE ImageId = #GetInfo3.ImageID#
</cfquery>

Have a good weekend,

Joe

-- 
For Tabs, Trees, and more, use the jComponents:
http://clearsoftware.net/clear/?template=downloads.jComponents

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF 
community.
http://www.houseoffusion.com/banners/view.cfm?bannerid=34

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182428
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to