I can't do DATE_FORMAT works... any ideas?
Hi all
In reviewing the fantastic book of David Powers, "PHP Solutions", I decided to work with dates in a database.
The table storing the dates is called cal_dates and is of type DATE.
All dates are stored as yyyy-mm-dd
When I write my query and add DATE_FORMAT, bombs page no matter what I try.
As in:
SELECT *.
Date_format (cal_dates, '% c/%e/%Y') AS cal_dates
OF cal_data
and I get a white screen.
So, I thought that maybe I should change the alias (the example in the book of authorities at page 390 does not use a different alias, but after struggling with it for almost 2 days, I try now what anyone):
SELECT *.
Date_format (cal_dates, '% c/%e/%Y') AS cdate
OF cal_data
and I get a white screen.
Originally, my query has been designed with a WHERE clause, because I'm selecting data in a table based on a variable, but I read somewhere that DATE_FORMAT not can be used with WHERE... which is funny, since the two examples above with omitted CASES still bomb.
The original request:
SELECT *.
OF cal_data
WHERE cal_data.page_ym = '%$dateRef '.
works PERFECTLY. It takes all the information in the relevant table to the $dateRef variable.
I wanted to use DATE_FORMAT is because I wanted to take dates in yyyy-mm-dd table and display them in a different format.
But in vain. Any ideas or thoughts would be appreciated. I'm obstructionisme.
Thanks to you all!
Sincerely,
wordman
I think that booth is onto something... If the only field in cal_data is the cal_dates so really nothing to select, only a date to put in shape. The cal_dates should also be designated AS anything other than the name, it is put in the form of. Try this: by omitting the SELECT statement and rename the cal_dates AS the_date
Date_format (cal_dates, '% c/%e/%Y') AS the_dates
OF cal_data
If this does not work, then create an AutoIncrement key, primary field in the cal_data table. Name of the field id for the query to something to select before you format the date as follows:
SELECT id, DATE_FORMAT (cal_dates, '% c/%e/%Y') AS the_dates
OF cal_data
I forgot... put a comma after the last field selection and the DATE_FORMAT function in your query, as in the example above and make sure you are echoing the_dates on the page to see the date of formatting appears.
Tags: Dreamweaver
Similar Questions
-
A videoagrapher sent me to edit MOV files. When I try to read up on the timeline just stuck... can not play at all. any idea?...
Hi Gilad,
It seems more an audio problem for me.
Please select all the clips on the timeline, right-click and select 'Remove' to separate the audio from the videos.
Once done select Audio only in the timeline and right click to select "Render and replace. Once done, save and close the project.
Try reading to check if it works.
You can also try to export an XML file i.e tab of project selection.
Go to file > export > Final Cut Pro XML
After creating a new project > import the XML file, and then open the sequence to check.
Vinay
-
I'm locked out of my iphone5 not connected to my wifi at home and my home button does not work, any ideas on how to fix?
< re-titled by host >
Take it to an Apple Store for repair or replacement.
-
My iPad has completely turned off and cannot be restarted connect to iTunes on my Mac. He comes up with an error 3014 overtime and so can't do anything. Any ideas on what it takes then please.
Looks like you have jailbroken your iPad.
You must restore like new with another computer.
-
I used "windows easy transfer", but after that I can see the files. Any idea about it?
original title: Windows easy transferHi Vrajeshparekh,
1. what files you're talking about?
2. When you see the files?When you use the Windows easy transfer cable to transfer the data that the data is copied. So you copy the data on the old computer also.
Windows Easy Transfer (applies to Windows Vista)
http://Windows.Microsoft.com/en-us/Windows7/products/features/Windows-easy-transferHow Windows Easy Transfer makes setting up a computer easier? (Applies to Windows Vista)
http://Windows.Microsoft.com/en-us/Windows7/how-does-Windows-easy-transfer-make-setting-up-a-computer-easier -
Pencil tool (N) close the trace does not work, any idea?
Pencil tool (N) close the trace does not work, any idea?
with the completion of a path with the pencil tool, I don't get the small circle at the cursor level to close the path.
Zoom click on the pencil tool in the tools Panel and you will see.
-
I just installed Captivate 7 but I can't help to load, any ideas?
I just installed Captivate 7 but I can't help to load, any ideas?
Hi hazelplt,
When you say that you can not load, is that average Captivate does not start?
Try running the application as 'Administrator' and check.
You can also check by the launch in "compatibility" mode and see.
In case still have problems you, try to reset the preferences of Captivate and then check by launching the application.
To reset the preferences, please follow the steps below:
- Close to Adobe Captivate.
- Find the folder preference:
- [ Windows Vista and Windows 7: C:\Users\[user name] 7 Captivate \AppData\Local\Adobe\Adobe folder
- Rename the folder of Captivate.
- Restart Adobe Captivate. A new folder is created automatically.
-
Yet once, when I go to online games and most of those who pop up a new window, the game is so small, that I can barely see it. How to fix this. Tried to compensate for the Aero themes, but it does not work. What I missed... Any ideas how to change these sizes?
Hi MaureenAnn,
Welcome to the Microsoft Answers Community Forum site!
In order to resolve your issue, please provide additional information;
- What is the game you are trying to play?
- Faced with this problem while playing games?
- It works correctly when you play a game stored on a computer?
- Was there any recent changes/updates / drivers installed on your computer?
If you are facing this problem, only with online games, suggest to enlarge the page by clicking on the icon zoom on the lower right of the browser.
Allows you to change the screen resolution by clicking Customize desktop by right-clicking on the desktop.
In addition, we suggest you to optimize internet Explorer and check if it solves your problem. To optimize internet Explorer, I suggest you visit the below mentioned link.
http://support.Microsoft.com/kb/936213/
I hope this helps solve your problem!
Thank you best regards &,.
Calogero - Microsoft technical support.
Visit our Microsoft answers feedback Forum
http://social.answers.Microsoft.com/forums/en-us/answersfeedback/threads/ and tell us what you think -
keyboard driver and the mouse does not, uninstall driver does not work, any ideas?
Just bought a sony vaio and have the driver of keyboard and mouse not working, uninstall the driver does not work, no idea how to solve this problem
Hello
Exactly how you are trying to install the driver?
We will analyze and identify the cause of the problem. You can connect a keyboard or an external mouse and check.
Method 1: Hardware store.
Run the troubleshooter of material and check if it works.
Follow the steps to run the Troubleshooter:
a. press the keys Windows + C on your keyboard to show the charms.
b. type Troubleshooting , and then clicksolving problems under settings.
c. now, type Hardware Troubleshooter in the optionSearch .
d. click convenience hardware store to run the troubleshooter.
Method 2:
http://www.Sony.co.in/section/support
Note: Search the driver by using the model number and download the latest driver.
Reference:
Why Windows is not find my device?
http://Windows.Microsoft.com/en-in/Windows-8/why-isn ' t-windows-conclusion-device
Hope this information helps. Response with status so that we can help you.
-
Adobe Reader DC will not start. Running Windows 8.1. Uninstalled and reinstalled. Will not start. Any ideas?
Hey You,
You get any sort of error message when you try to start the player?
Please uninstall, run the cleanup tool to remove all traces and then reinstall it from this page: https://get.adobe.com/reader.
You can get the cleanup of this page tool: Download Adobe Reader and Acrobat tool - Adobe Labs.
Best,
Sara
-
Firefox 7.0.1. Windows7 Pro 64.
Yesterday I was streaming audio of sky.fm and noticed that the back navigation toolbar arrow no longer and that he has failed since. FF restarting, rebooting the computer, same problem. Private browsing has never been used, i.e. the history file is fine. Using it is the only way to return to a previous page or the site. The visual indication only that the arrow was clicked, the firefox in the tool bar icon fades. All other indications are normal. The current url is displayed, and FF is sensitive to clicks on the link goes to the front - back just not.
Any ideas? Thank you, John.Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).
- Makes no changes on the start safe mode window.
- https://support.Mozilla.com/kb/safe+mode
Another possible cause is a problem with the places.sqlite file that stores the bookmarks and history.
-
EM3.exe I can't get this game to work any ideas?
I installed this game and when I went to go play. It came with an error message saying em3.exe has stopped working and I can not play
Duplicate thread:
Free hosting NO ads!
PHP + MySQL + 100GB bandwidth: -
At the same time, there was also an automatic update to my McAfee software, but I uninstalled it without benefit.
Unfortunately, my restore point installation has been disabled by inadvertence the at some point in the past, so I can't go back, at least easily.
You can find support for the installation/uninstall/upgrade / upgrade to Windows Live Essentials 2011 in this forum: http://windowslivehelp.com/forums.aspx?forumid=a372972e-8e7a-4d85-adc3-a1b43e8c02ec
Note: You have invited to upgrade to Windows Live Essentials 2011 QFE2 by one of your Windows Live installed applications (for example, Windows Live Mail), not Windows Update.
-
I tried back up to a computer and the Re-store but will not restore to Air 2.
Transfer the contents of an iPhone, iPad or iPod touch on a new device
-
Exchange image BG won't work - any ideas why not?
http://designerandpublisher.com/test-BG/test-BG-page01.html
Hi - I am trying to establish an exchange of background image where when the user visits the site and by clicking on the links, the background image changes. You will see the soldier one there now and I have others.
The JS file 2 HTML pages are linked to the does not seem to work [see above].
No idea why it does not work, or is there a better JS file anyone can be aware of which isn't what I'm looking for?
Thank you - Guy deaf
Change of body to #swapBg as below:
{#swapBg}
background-repeat: repeat no.;
background-attachment: fixed;
left margin: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
Maybe you are looking for
-
HelloMy laptop seven year old made me proud til yesterday, but now it does not fire upwards. Instead, it hangs for a minute or two (black screen, no HARD drive light blinks, nothing), while it charges to a screen with two options - either start the s
-
HP Officejet J3608: HP Officejet J3608
How to recover the last 5 numbers I got call on my HP Officejet J3608 all-in-one?
-
Photosmart e station C510a software requires disc
All of the sudden, when I run it requires the installation disc HP Solution Center software. She does it every time. Any ideas? "the component you are trying to use is on a CD-ROM or another removable disk that is not available." Insert Solution Ce
-
ACER 5515 will not clean install of Win XP or Vista
I try to put my fully functional level but slow Acer 5515 to use for video capture (use of astronomy) I bought a WD 320 GB Black HD that has been initialized, partitioned, formatted, & using the MBR & NTFS option. When you attempt to load Win XP lapt
-
MP3 player does not light after firmware update
I recently downloaded the Sandisk firmware update software and completed the most recent firmware update. Everything is was the firmware update I turned off the player until the firmware has finished updating. It will not now power, or he can reset.