Yea sorry.  'darksoldiers' in this case would be the datasource name that
appears in coldfusion admin.  I tested the code before pasting :)

Change this to whatever datasource name applies is your case.

You can just paste this between body tags, save and run.

Mike



----- Original Message ----- 
From: "Jean-Charles Carelli" <[EMAIL PROTECTED]>
To: "CF-Newbie" <[EMAIL PROTECTED]>
Sent: Thursday, November 11, 2004 12:11 PM
Subject: Re: registering mySQL with CFMX 6.1


> Thanks for the sample code.  Not to be too obtuse but I want to make
> sure I understand how to use your sample.
>
>
> 1. Does "darksoldiers"  refer to the DSN or the actual database?  In
> either case I will replace "darksoldiers" with my own relevant
> reference.
>
> 2. I will drop your code into a cfm.  Do I need any supporting HTML?
> Or will the result appear in the browser window the way echo works with
> PHP?
>
> Sorry if this clarification is beyond redundant but I am quite
> frustrated at this point and I cannot make any assumptions...
>
> Thank you and I will report back!
>
> Best,
>
> J-C
>
>
>
> > CODE BELOW:
> >
> > <cfquery name="drop" datasource="darksoldiers">
> >   drop table mytest
> > </cfquery>
>
> > <cfquery name="create" datasource="darksoldiers">
> >   create table mytest (id int, name varchar(20))
> > </cfquery>
> >
> > <cfquery name="adddata" datasource="darksoldiers">
> > insert into mytest (id, name) VALUES (1, 'bob')
> > </cfquery>
> >
> > <cfquery name="test" datasource="darksoldiers">
> >   select * from mytest
> > </cfquery>
> >
> > <cfoutput>
> >   RECORDS:#test.recordcount#
> > </cfoutput>
> >
> >
> >
> > you should see 'RECORDS:1'
> >
>
>
>
> On Nov 11, 2004, at 12:55 PM, Mike Chytracek wrote:
>
> > JC.
> >
> > We have 12 machines running redhat 7,8,9 all with mysql and 5, and MX
> > 6.1
> >
> > Myql is as simple as pie..  Once the table is set up and the user has
> > access
> > to it,  they set up a datasource in the cfadmin.
> >
> > Make sure they are allowing you to create, drop, insert, select, alter,
> > index at the minimum.
> >
> >
> >
> >
> > CODE BELOW:
> >
> > <cfquery name="drop" datasource="darksoldiers">
> >   drop table mytest
> > </cfquery>
> >
> > <cfquery name="create" datasource="darksoldiers">
> >   create table mytest (id int, name varchar(20))
> > </cfquery>
> >
> > <cfquery name="adddata" datasource="darksoldiers">
> > insert into mytest (id, name) VALUES (1, 'bob')
> > </cfquery>
> >
> > <cfquery name="test" datasource="darksoldiers">
> >   select * from mytest
> > </cfquery>
> >
> > <cfoutput>
> >   RECORDS:#test.recordcount#
> > </cfoutput>
> >
> >
> >
> > you should see 'RECORDS:1'
> >
> >
> > Mike
> >
> >
> > ----- Original Message -----
> > From: "Jean-Charles Carelli" <[EMAIL PROTECTED]>
> > To: "CF-Newbie" <[EMAIL PROTECTED]>
> > Sent: Thursday, November 11, 2004 10:12 AM
> > Subject: Re: registering mySQL with CFMX 6.1
> >
> >
> >> Dear Stephen,
> >>
> >> I am still tryng to get CF to recognize my DNS.  My hosting company
> >> has
> > once again told me that the problem is a CF bug and that there is no
> > solution!  This is exactly what they told me in regards to email
> > spooling
> > and you were able to help me prove them wrong! I hope we can do the
> > same
> > here.
> >>
> >> The trick is that I am new to everything so it is difficult to follow
> >> a
> > logical troubleshooting method.  I have checked out the mySQL links you
> > offered and I have increased the privileges using GRANT and wildcards
> > to
> > force MySQL to accept CF.  It has not worked.
> >>
> >> I found a MM techNote for troubleshooting MySQL on Red Hat Linux (
> > http://www.macromedia.com/support/coldfusion/ts/documents/tn17903.htm
> > )and
> > have a few questions:
> >>
> >> I was able to confirm steps 1 thru 3.  Step 4 suggests I use a
> >> cfquery to
> > query the data source.  The result will be an error message that will
> > allow
> > further trouble-shooting.
> >>
> >> The trouble is I am so new to CF that I need an example of a cfquery
> >> that
> > I know works so that I can eliminate the cfquery as a culprit in my
> > test.
> > Can anyone provide a sample of a well formatted cfm that has a cfquery?
> >>
> >> Finally,  do you have CF and MySQL working on Red Hat?  If so are
> >> they on
> > the same machine?  Perhaps you could share the details of your set-up.
> >  It
> > was this aproach that solved my mail spooling problem.
> >>
> >> Many thanks.
> >>
> >> J-C
> >>
> >>
> >>
> >>
> >>
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

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

Reply via email to