Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-01-2011, 03:06 AM   PM User | #1
hockeyhed
New to the CF scene

 
Join Date: Nov 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
hockeyhed is an unknown quantity at this point
Help Changing to PHP from ColdFusion

Hi, I am trying to figure out some code. We are switching a few things from Cold Fusion to PHP and while I am making progress this piece of code is giving me grief. Can anyone provide some suggestions? All we do is query a MySQL DB for our calendar info and output a basic events page. I am not quite sure how to change this over properly and hopefully easily. Thanks in advance for any help!

<cfquery name="get_dates" datasource="mysqlcf_calendar">
select Event_Name,Event_Description,DATE_FORMAT(Event_Date,'%M %D, %Y') as EV_Date
from EVENTS
where Event_Date >= CURRENT_DATE-1
order by Event_Date
</cfquery>
<span class="news">
<h1>news & events</h1>
<cfoutput query="get_dates" maxrows=3>
<span class="dates">#EV_Date#</span><br />
<span class="event"><strong>#Event_Name#</strong><br /> #Event_Description#</span><br /><br />
</cfoutput>
</span>
hockeyhed is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:40 AM.


Advertisement
Log in to turn off these ads.