msa wrote:
My date format is as aboveI am getting the following error message:
You have an error in your SQL syntax. Check the manual that corresponds to
your MySQL server version for the right syntax to use near 'Y') . ' AND
MONTH(date) = ' . date('m') . ' ORDER BY sort DESC'
I changed your
Msa [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
'SELECT * FROM table WHERE YEAR(date) = ' . date('Y') . ' AND
MONTH(date)
=
' . date('m') . ' ORDER BY SORT DESC'
What column type is your date column of? I know that the above statement
works with the MySQL date (-MM-DD)
Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
date('m') was not parsed by php as it was in the string. Syntax
highlighting would help you see it. Try:
SELECT * FROM NewsArchive WHERE YEAR(date) = ' . date('Y') . ' AND
MONTH(date) =' . date('m') . ' ORDER BY sort
Msa [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
date('m') was not parsed by php as it was in the string. Syntax
highlighting would help you see it. Try:
SELECT * FROM NewsArchive WHERE YEAR(date) = '
Daniel Clark [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Are you looping through the record set?
SELECT * FROM NewsArchive WHERE YEAR(date) = ' . date('Y') . ' AND
MONTH(date) =' . date('m') . ' ORDER BY sort DESC;
Well, still not working...but maybe closer? Not getting
Daniel Clark [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Are you looping through the record set?
i thought I was, but it isn't working!!
here is the code with all of the latest suggestions.
start code at top of document:
?php require_once('Connections/jpike.php'); ?
?php
Msa [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Daniel Clark [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Are you looping through the record set?
i thought I was, but it isn't working!!
here is the code with all of the latest suggestions.
start code at top
Are you looping through the record set?
SELECT * FROM NewsArchive WHERE YEAR(date) = ' . date('Y') . ' AND
MONTH(date) =' . date('m') . ' ORDER BY sort DESC;
Well, still not working...but maybe closer? Not getting an error message,
just not returning any data.
--
PHP General Mailing
- Original Message - start code at top of document:
?php require_once('Connections/jpike.php'); ?
?php
mysql_select_db($database_jpike, $jpike);
$query_rsENews = 'SELECT * FROM NewsArchive WHERE YEAR(date) = ' .
date('Y')
. ' AND MONTH(date) = ' . date('m') . ' ORDER BY sort
Are you getting any output?
?php require_once('Connections/jpike.php'); ?
?php
mysql_select_db($database_jpike, $jpike);
$query_rsENews = 'SELECT * FROM NewsArchive WHERE YEAR(date) = ' .
date('Y')
. ' AND MONTH(date) = ' . date('m') . ' ORDER BY sort DESC';
$rsENews =
no.
- Original Message -
From: Daniel Clark [EMAIL PROTECTED]
Newsgroups: php.general
To: msa [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, May 04, 2004 5:02 PM
Subject: Re: [PHP] Re: repeating data from one column until data from
another column changes
Are you getting any
Netscape browser?
In your browser have you checked View Source to see it table data is there?
no.
- Original Message -
From: Daniel Clark [EMAIL PROTECTED]
Are you getting any output?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
definitely
Daniel Clark [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Netscape browser?
In your browser have you checked View Source to see it table data is
there?
no.
- Original Message -
From: Daniel Clark [EMAIL PROTECTED]
Are you getting any output?
: repeating data from one column until data from
another column changes
- Original Message - start code at top of document:
?php require_once('Connections/jpike.php'); ?
?php
mysql_select_db($database_jpike, $jpike);
$query_rsENews = 'SELECT * FROM NewsArchive WHERE YEAR(date
Php [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
If you have no may articles then there will be no records returned.
Just change the . date('m') to the actualy month you want if not the
current month.
except if I have to specify the specific month I want, then every month I
Just for right now, go ahead a make the date change, or elimate the date
range to get SOMETHING to come out.
Just change the . date('m') to the actualy month you want if not the
current month.
except if I have to specify the specific month I want, then every month I
have to go in and
* Thus wrote msa ([EMAIL PROTECTED]):
Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
date('m') was not parsed by php as it was in the string. Syntax
highlighting would help you see it. Try:
SELECT * FROM NewsArchive WHERE YEAR(date) = ' . date('Y') . ' AND
* Thus wrote msa ([EMAIL PROTECTED]):
I didn't hand write much of thisdreamweaver writes a lot of it behind
the scenes.i'm not much of a code writer, just get into small needs here
and there...REALLY appreciate all of you trying to help me!!!
dreamweaver writes buggy code, you'd be
when i take out the WHERE clause, I get ALL 192 titles in the upper right
side and ALL 192 titles and descriptions in the main body..which is
almost what i want...minus about 180 titles and articles
Daniel Clark [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Just for right
Good :-)
You are narrowing the error down :-)
Sounds like it's in the date section then.
when i take out the WHERE clause, I get ALL 192 titles in the upper right
side and ALL 192 titles and descriptions in the main body..which is
almost what i want...minus about 180 titles and
Why not change the code back, then just add an article for the month of may
and see if it comes up?
when i take out the WHERE clause, I get ALL 192 titles in the upper right
side and ALL 192 titles and descriptions in the main body..which is
almost what i want...minus about 180 titles
Php [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Why not change the code back, then just add an article for the month of
may
and see if it comes up?
i am trying to automate this so I don't have to look at it againclient
updates the pages and I won't be getting paid beyond
22 matches
Mail list logo