Click to See Complete Forum and Search --> : Limitations of mySQL 3.23


mattastic
04-13-2006, 07:28 AM
Hi,

Couls someone please tell me the limitations of this version of sql?

I am currently developing my site in MySQL 5.0.15, but the host I upload too will only have 3.23, and nothing seems to work.

Thankyou

<Eddie>
04-13-2006, 07:48 AM
Off the top of my head that only differences are security and performance related, but the language hasn't changed [If someone wants to research this please correct me].

You'd be better off explaining what isn't working and posting the particular SQL statements you're using.

mattastic
04-13-2006, 02:12 PM
Thanks for your reply.

I have this error:

Error: 1064: You have an error in your SQL syntax near '('')
BETWEEN DATE(startdate) AND
DATE(enddate)' at line 3

Here is my code:



<?php
// Connecting, selecting database
$link_id = db_connect();

$day = 01;
if (! isset($_GET['month']))
{
$month = date("m");
$day = date("d");

}

if (! isset($_GET['year']))
{
$year = date("Y");
echo $year;
}


if (! isset($_GET['month']))
{
// get current date
$current = date("Y-m-d", mktime(0, 0, 0, date("m") , date("d"), date("Y")));

echo "SELECT *
FROM tblevent
WHERE DATE('$tempdate')
BETWEEN DATE(startdate) AND
DATE(enddate)";

$query = "SELECT *
FROM tblevent
WHERE DATE('$tempdate')
BETWEEN DATE(startdate) AND
DATE(enddate)";
}else{
// if month is selected shoq all events for that month
// date top use in query
$tempdate = $year . "-" . $month . "-" . $day;

// gets the date for the start of the next month date("Y-m-d", strtotime("+1 months"));
$tempdate2 = date("Y-m-d", mktime(0, 0, 0, ($month + 1), $day, $year));
echo "SELECT *
FROM tblevent
WHERE startdate >= '$tempdate' AND enddate < '$tempdate2'
ORDER BY eventdate ASC";
$query = "SELECT *
FROM tblevent
WHERE startdate >= '$tempdate' AND enddate < '$tempdate2'
ORDER BY startdate ASC";


}
$result = mysql_query($query);
if(!$result) error_message(sql_error());
?>

chazzy
04-14-2006, 05:16 AM
actually the language is significantly different. a lot of the date functions are missing, you can't have nested selects (ie select * from (select ... ) is invalid)

<Eddie>
04-14-2006, 05:38 AM
Wow! and there was me think subqueries were fundamental to accessing information. I come from an Microsoft Server SQL and Oracle background so don't know the ins and outs of old MySQL but it looks like you have some work to do to run your queries mattastic...

chazzy
04-14-2006, 08:12 AM
or upgrade your environment as 3.23 is no longer a supported platform and the first thing that any person supporting this will say is "upgrade your database, this is fixed in xxx vesion"

mattastic
04-14-2006, 11:21 AM
ARRRGGGHHHHHHH.....

Thats not what I wanted to hear!!!!

No subqueries or date functions?? As I'm developing an online calendar, its not good news.

Ah heck, now I'm stuck.... :confused:

Thanks for your replies anyway.

chazzy
04-14-2006, 12:58 PM
as I've pointed out in numerous threads like this, having your development and production servers differ can be catastrophic.

Also, I didn't say there are no date functions, but that they differ greatly.