MySQL said:
#1064 - 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 '( `w_date` , DATE_FORMAT( NOW( ) , '%Y-%c-%e' ) ) AS date_
Getting married in Malta?
Visit www.TheWeddingSite.com
Error
MySQL said:
#1064 - 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 '( 'w_date', NOW( ) ) AS date_diff
FROM fweddings
WHERE date_
Getting married in Malta?
Visit www.TheWeddingSite.com
SELECT b_name, DATEDIFF('u_date', NOW()) AS date_diff FROM fweddings where date_format(w_date, '%M')='January' and date_format(w_date, '%Y')='2004' order by w_date,b_name
Using the above in my sql gave me the error...
#1064 - You have an error in your SQL syntax. Check the manual that...
I wrote a query...
SELECT b_name, b_surname, b_town,g_name, g_surname, g_town,u_date,w_date,message, DATEDIFF('w_date', NOW()) AS date_diff
FROM fweddings where date_format(w_date, '%M')='January' and date_format(w_date, '%Y')='2004' order by w_date,b_name
But I am getting the error...
#1064...
RE ABOVE...Correction
I am comparing a date field in the table with todays date. I want that if today's date is greater than the date field by 5 days or less then ...my statement runs.
I am using
<? if (date("z",$Row['u_date']) - date("z") <5): ?>
etc...
As I said above the problem is that...
In mysql I have 2 date fields. Dates are stored in the format yyyy-mm-dd eg: 2004-11-26
I needed a condition where if the difference between the 2 date fileds is less than 5 days "NEW" appears. So i thought that if I convert the dates to a Julian dates I can compare them. The problem is that...
I have setup Apache 127.0.0.1:85 and it works fine. In conf file there is also an entry Servername localhost:80 Does this require to be changed?
Then I installed the IIS and added the ASP site. Have changed none of the default settings. However ASP pages give me "The page cannot be displayed"...
Hi,
I have installed Apache, Mysql and Php on my local machine. But to do this I had to disable Window's IIS.
The problem is that I have websites which reside on Apache servers thus I need to test my localhost on Apache and others on Windows thus I need also to test Windows server.
How can I...
I need to dump my table on the localhost so that I can rerun the script on the remote site using phpmyadmin.
The problem is that both tables (local and remote) have an autonumber field and thus cannot insert data in it. How can go about it?
Getting married in Malta?
Visit...
For your info...
This is a java calendar like i need
http://www.softcomplex.com/products/tigra_calendar/demo1.html
Thanks anyway
Getting married in Malta?
Visit www.TheWeddingSite.com
There is something else, the others are not entirely being ignored, If I leave the first element empty but fill the second element no alert message is given. It looks like the if statements are like "AND" ie, if <condition> and <condition> etc...
I need an "OR" ie, If <condition> or...
This function is working only if the first field beong check is left empty 'add.b_name', the others are being ingonored. Any idea why? I am not sure about the four } I have placed at the end, one for every if statement.
Thanks
function formCheck() {
var not_blank = true;
if...
Hi aperry,
That is exactly what I need. I have pasted the top part of the script as javascript and pasted the other part in the form.
Whilst I got no error I ended with a drop down having "php output" in the list.
I assume the code is not complete as you offered to email me the full code. I...
Hi,
I have a form where it accepts a date inputted by users. I need users to input ONLY in dd-mm-yyyy format. What is the best way to do it?
I was thinking of having 3 list boxes for the days, months and years. But I need to check the inputted dates for invalid entries like for eg...
Hi,
I have a folder in my cgi which contains an emailing script. Due to data sensitivity (email addresses, etc...) I have set a password which prompts you before giving you access.
However, when I set a cronjob to run the script automatically, it failed because of the password. Can I give...
Hi,
The code by Tarwn worked perfect. Thanks
CODE
If ucase(dbrec("curname")) = "EURO" Then
Response.Write dbrec("curvalue")
ElseIf dbrec("curvalue") = 0 Then
Response.Write "N/A"
ElseIf Not isNumeric(dbrec("curvalue")) Then
Response.Write dbrec("curvalue")
Else
Response.Write...
Hi Thanks for your help.
Yes, mine is a nested iif statement. Tarwn, I shall try your suggestion that later on today.
Tarwn you wrote "If they were truly all numbers except for EURO or 0's (which are numbers)"
PS: EURO is NOT numeric. All other fields are.
What I wanted to make clear is...
Hi Tarwn,
No they are all numeric except the EURO but that I already took care of with the iif statement...
<%=iif(dbrec("curname")<>"EURO",iif(dbrec("curvalue")="0","N/A",formatnumber(cdbl(dbrec("curvalue")))),dbrec("curvalue"))%></div></td>
Also no currency symbols are involved. The text...
No I have records.
The full line of code is
<%=iif(dbrec("curname")<>"EURO",iif(dbrec("curvalue")="0","N/A",dbrec("curvalue")),dbrec("curvalue"))%></div></td>
Tha above work but I need to add the trailing zeors if curvalue is less than 4 decimal places...so I tried...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.