Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Asp and Mysql

Reply
Thread Tools

Asp and Mysql

 
 
M. Savas Zorlu
Guest
Posts: n/a
 
      11-23-2007
Hi,

I just decided to leave Mssql and start using Mysql. I am having some
problems with my queries; is there anyone here who has a knowledge of
query syntax in Mysql?

If so, I need some help with couple of queries.
 
Reply With Quote
 
 
 
 
Adrienne Boswell
Guest
Posts: n/a
 
      11-23-2007
Gazing into my crystal ball I observed "M. Savas Zorlu"
<> writing in news:ebAH#ofLIHA.2432
@TK2MSFTNGP04.phx.gbl:

> Hi,
>
> I just decided to leave Mssql and start using Mysql. I am having some
> problems with my queries; is there anyone here who has a knowledge of
> query syntax in Mysql?
>
> If so, I need some help with couple of queries.
>


What specific queries are you having problems with? Have you looked at the
MySQL site to find help? This is really a MySQL topic and is more
appropriate at comp.databases.mysql . Follow-ups set.


--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share

 
Reply With Quote
 
 
 
 
Brynn
Guest
Posts: n/a
 
      11-24-2007
On Nov 23, 11:56 am, "M. Savas Zorlu" <sa...@zorlumail.com> wrote:
> Hi,
>
> I just decided to leave Mssql and start using Mysql. I am having some
> problems with my queries; is there anyone here who has a knowledge of
> query syntax in Mysql?
>
> If so, I need some help with couple of queries.


What problems were you having with the queries with MSSQL. I can't
IMAGINE you having any better luck with mysql. I program with both. If
you can be more specific with your problem, we should be able to help.

Personally ... I would like to help you with your MS SQL problem ... I
like to build applications that burn circles in the cement around
mysql! HOWEVER, I like mysql for my smaller clients too ... but even
then I try to get them to use sql server 2005 express with an xml
workhorse program of mine if I can .. heh.

Anyway, let us know.




Take care,
Brynn Curry
 
Reply With Quote
 
M. Savas Zorlu
Guest
Posts: n/a
 
      11-24-2007
Dear Brynn,

thank you for your response. Firstly MSSQL is too expensive. MSSQL 2005
express seemed even slower than access in queries. (I had recently
upsized from access) amd it lacks the tools for tuning and I am not a
dataabse expert so I am not sure how to tune the 2005 XPRESS to perform
better.

here is one query that doesnt work:

SELECT COUNT(AD_ID) AS unpaid FROM tblADS WHERE A_PAID = 0 AND A_USER =
1 AND A_STATUS > 0 AND DateDiff(h, now(), A_DATE_END) > 0

its the datediff function that I cannot find a way to make it work in mysql


my other problem is paging through recordsets.

cursor locks etc. they dont seem to work in mysql. I found a solution
which involves using LIMIT 0,20 sort of things but that doesnt look like
the optimum way to do it to me.

Brynn wrote:
> On Nov 23, 11:56 am, "M. Savas Zorlu" <sa...@zorlumail.com> wrote:
>> Hi,
>>
>> I just decided to leave Mssql and start using Mysql. I am having some
>> problems with my queries; is there anyone here who has a knowledge of
>> query syntax in Mysql?
>>
>> If so, I need some help with couple of queries.

>
> What problems were you having with the queries with MSSQL. I can't
> IMAGINE you having any better luck with mysql. I program with both. If
> you can be more specific with your problem, we should be able to help.
>
> Personally ... I would like to help you with your MS SQL problem ... I
> like to build applications that burn circles in the cement around
> mysql! HOWEVER, I like mysql for my smaller clients too ... but even
> then I try to get them to use sql server 2005 express with an xml
> workhorse program of mine if I can .. heh.
>
> Anyway, let us know.
>
>
>
>
> Take care,
> Brynn Curry

 
Reply With Quote
 
M. Savas Zorlu
Guest
Posts: n/a
 
      11-24-2007
Dear Adrienne,

thank you for your response. I will definitely look into
comp.databases.mysql

Adrienne Boswell wrote:
> Gazing into my crystal ball I observed "M. Savas Zorlu"
> <> writing in news:ebAH#ofLIHA.2432
> @TK2MSFTNGP04.phx.gbl:
>
>> Hi,
>>
>> I just decided to leave Mssql and start using Mysql. I am having some
>> problems with my queries; is there anyone here who has a knowledge of
>> query syntax in Mysql?
>>
>> If so, I need some help with couple of queries.
>>

>
> What specific queries are you having problems with? Have you looked at the
> MySQL site to find help? This is really a MySQL topic and is more
> appropriate at comp.databases.mysql . Follow-ups set.
>
>

 
Reply With Quote
 
Daniel Crichton
Guest
Posts: n/a
 
      11-26-2007
M. wrote on Sat, 24 Nov 2007 14:36:30 +0200:

> Dear Brynn,


> thank you for your response. Firstly MSSQL is too expensive. MSSQL 2005
> express seemed even slower than access in queries. (I had recently upsized
> from access) amd it lacks the tools for tuning and I am not a dataabse
> expert so I am not sure how to tune the 2005 XPRESS to perform
> better.


MSSQL 2005 is free, so I can only assume you're "too expensive" reference is
directed at the other editions. The tuning tools mostly involve creating
indexes. Upsizing from Access isn't great, it leaves a lot to be desired
(although I haven't upsized since Access 97, so maybe the tools got better,
but I doubt it). If you can't work out what indexes you should be creating
in MS SQL, do you really think using MySQL will help?

> here is one query that doesnt work:


> SELECT COUNT(AD_ID) AS unpaid FROM tblADS WHERE A_PAID = 0 AND A_USER =
> 1 AND A_STATUS > 0 AND DateDiff(h, now(), A_DATE_END) > 0


> its the datediff function that I cannot find a way to make it work in
> mysql



Searching on Google for MySQL Datediff throws up lots of results, most of
which will make it clear that the syntax for datediff is different.

eg. http://dev.mysql.com/doc/refman/5.0/...ction_datediff

MySQL's datediff only takes 2 arguments, and returns the number of days.
You can't use it to work out the number of hours difference, you would have
to use DATE_ADD instead to add hours to the current time and compare to the
column in the database.

Dan


 
Reply With Quote
 
 
 
Reply

Thread Tools

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Python and Connecting to MySQL remotely WITHOUT MySQL installedon local computer dave Python 4 11-18-2010 04:19 AM
Re: How to insert PDF file in to MySql and read it from MySql toJAVA App Jeffrey H. Coffield Java 1 07-24-2009 12:29 AM
Re: How to insert PDF file in to MySql and read it from MySql to JAVA App Roedy Green Java 0 07-23-2009 05:30 PM
mySQL Ruby Gem and MAMP mySQL Mark Meijer Ruby 3 02-03-2008 04:19 AM
Has Anyone build A Mysql Module for ruby1.8.2 and Mysql 4.1.8 bin liu Ruby 1 12-22-2004 03:39 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57