Trying to list 15 days remaing registers ['com_exception' ]
Dears Sirs,
I've been trying to list 15 days remaing announcements registered on access database using PHP and SQL routines.
I've sucess when doing a quey "select * from BD" without other codes.
Error:
1261306544
2009/12/20
Fatal error: Uncaught exception 'com_exception' with message
'<b>Source:</b>
Unknown<br/><b>Description:</b> Unknown' in
C:\wd\xampp\htdocs\nf\admin\consulta_vencendo.php:9
Stack trace:
#0 C:\wd\xampp\htdocs\nf\admin\consulta_vencendo.php(9):
com->Execute('select * from P...')
#1 {main} thrown in C:\wd\xampp\htdocs\nf\admin\consulta_vencendo.php on line 9
Code:
<?php
//Eu preciso fazer uma consulta onde me mostre apenas os registros que irão vencer nos proximos 15 dias
$conexao = new COM("ADODB.Connection");
$conexao->Open(((((("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\wd\\negociofeito\\admin\\dat\\bd.mdb"))))));
$timestamp = strtotime('+15 days'); // soma 15 dias a data atual
$comp = date('Y/m/d', $timestamp); //grava data com 15 dias somados
print $timestamp . "<br/>";
print $comp;
$recordset = $conexao->Execute("select * from PRO where (STR_TO_DATE('PRO_DTCAD','Y/m/d') + current_date) >= current_date AND (STR_TO_DATE('PRO_DTCAD','Y/m/d') + current_date) <='$comp'");
echo "CÓDIGO" . " | " . "NOME" . " | " . "PREÇO" . " | " . "DATA CADASTRO" . " | " . "DURAÇÃO ANÚNCIO" . "<BR/>";
while (!$recordset->EOF) {
echo " | " . $recordset->fields["PRO_COD"]->value;
echo " | " . $recordset->fields["PRO_NOME"]->value;
echo " | " . $recordset->fields["PRO_PRECO"]->value;
echo " | " . $recordset->fields["PRO_DTCAD"]->value;
echo " | " . $recordset->fields["PRO_DURAC"]->value;
echo "<br/>";
$recordset->MoveNext();
$conexao->Close();
?>
I've have no idea if this is it, but queries for MS Access require hash (#) surrounding dates. Try that and see.
Similar Messages
-
My iPad won't open itunes. Wifi ok safari working. Software update trying to download for days 7.1.1. Is this the problem? How to fix?
If Safari is working otherwise and you can log onto other websites, try clearing Safari and reset your iPad. That might help with the Twitter app as well.
Settings>Safari>Clear Cookies and Data.
Reset the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up. -
I have different account ID's with my iphone and computer.
I would like to standardize both to just the one.
One of the ID's doesn't work, when I tried to list this second email with the preferred one a message telling me that this email is already in use pops up.. yes it is, with me??
Is there an easy to fix this please, FabfitzIf the email address you want to use is being used as the primary email address on a different ID you have to manage that ID and change it to a different primary email address. This explains how: Change your Apple ID - Apple Support.
If it is being used as an alternate or rescue address on a different ID, you manage the ID and either remove it or change it to a different email address. This explains how: Manage your Apple ID primary, rescue, alternate, and notification email addresses - Apple Support. -
My iPhone 4S had the iOS 6 update and I have been trying to download all day but it won't work and now when I go to software update of says iOS 5.1.1 is up to date. And I cant restore my iPhone becuase when I go onto iTunes it says that it can't find my iPhone. I have tryed to download the most resent iTunes because I went to apple website and just hit download iTunes so I guess it's the most resent version and I don't know what to do. Should I go to an apple store?
If your are using IOS 4, see below.
http://support.apple.com/kb/HT4972 -
I tried downloading the 30-day free trial and I kept getting "failed" message 49. How do I resolve this error?
Hi Charmaine,
Please follow the article: Error downloading, installing, or updating Creative Cloud applications which might help to solve the above error message.
Thanks,
Ratandeep Arora -
Trying to download CS6 on my mac pro. when i click on Download, under my orders, it brings up an error page: JRun Servlet error, 413 Header Length to Large. It's been doing this each time I've tried that last few days. What can I do to download this?
clear your adobe.com cookies or use a different browser.
-
Listing order and dates of my photos have all changed and now it is a mess in my photo library! I tried to list them again by date, but it didn't fix the problem. What to do?
If your preferences keep getting messed up try this: make a temporary, backup copy (if you don't already have a backup copy) of the library and try the following:
1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your
User/Home()/Library/ Preferences folder.
2 - delete iPhoto's cache file, Cache.db, that is located in your
User/Home()/Library/Caches/com.apple.iPhoto folder.
Click to view full size
3 - launch iPhoto and try again.
NOTE: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto. You'll also have to reset the iPhoto's various preferences.
Happy Holidays -
Used Migration Assistant to successfully transfer PC files to Mini. However file creation or modified date does not transfer. Date of creation is listed as day of transfer. I would gratefully appreciate any help in solving this?
I have the same problem; used Migration Assistant to transfer all my pix from PC to MacbookPro, however dates of pix were not transferred. Date created as the date of transfer. Cannot sort my pix according to date.
Anybody has an answer? -
Help trying to list measures from cube.
Hi all,
I'm trying to list measures from a cube using BAPI_MDPROVIDER_GET_MEASURES, but the name of the measures (MES_NAM) I get seems to be coded, and I haven't been able to find how to convert it to "the usual" name.
I must note that I don't know much about BW so accept my apologies if it seems that I don't know what I'm talking about ... because I don't ;).
Thanks for any help you can provide.I couldn't resolve this, look here:
What says below isn't right. sorry.
Hi,
In case anyone has a similar problem, what I was trying to do is get a list of cubes, get the queries associated with those cubes, get the characters and key figures associated with those queries, so I could upload a file to BW.
My solution was to get the chars and keyfigs related to the query using BAPI_CUBE_GETDETAIL, that would give me the tecnical name of the char/keyfig and then made a RFC that calls RSAR_INFOOBJECTS_GET_TEXTS to get the description of the char/keyfig.
I don't know if its the best way to do it, h*ll I don't know exactly what I'm doing...but as long as it works (for me)...:)
Cheers
Message was edited by: Andrés Acero -
the sound on my ipad 3 suddenly stopped working i dont know why i tried the last two days to fix it and also restored it and the sound never came back, please help.....
Do you get sound on any apps e.g. Music and Videos but not others ? If you do then have you got notifications muted ? Only notifications (including games) get muted, so the Music and Videos apps, and headphones, still get sound.
Depending on what you've got Settings > General > Use Side Switch To set to (mute or rotation lock), then you can mute notifications by the switch on the right hand side of the iPad, or via the taskbar : double-click the home button; slide from the left; and it's the icon far left; press home again to exit the taskbar. The function that isn't on the side switch is set via the taskbar instead : http://support.apple.com/kb/HT4085 -
I am running OS X 10.9
but when trying to list an item to sell on ebay it say= Sorry. Your browser doesn't support the popular listing options selling form. If you'd like to try it, please try using Internet Explorer 6 or higher, or Firefox 1.5 or higher.
Help please so I can continue my sad lifeTried to see if it is looking for flash and it is disabled or not installed by default; java (not being installed and best to turn it off normally), browser agent to report it as something else.
Opera comes the closest I've read to spoofing a site telling it is IE but you have to do so per site. Also OmniWeb. -
i have just paid for an app but it will not download it just says theres an error try again later ive been trying it for 2 days!!!
what shall i do now?
-
my ipod touch 4th generation 32gb will not turn on ive tried holding the on/off button for more than 10 seconds and still there is no response i have tried this over several days and nothing is working - i have checked the charger and also have tried charging from the laptop so this isnt the problem - please help as i have not been able to use it fr ages
Try here:
iPod touch: Hardware troubleshooting
Also try placing the iPod in recovery mode and then try to restore via iTunes. For recovery mode see:
iPhone and iPod touch: Unable to update or restore -
have itunes vouchers and each time i click redeem , I get error "we could not complete your itunes store request, an unknown error occured 1202, try again later. I have tried this for 4 days running and get same error.
I have this same problem. It's like it is not Authorizing this Mac.
What happens when you try to listen to a preview on the Music Store?
Mine asks me to authorize again and gives me the error exactly as you said above.
What happens when you try to view your account information (in Music Store, click on your account name in the top right corner)?
Mine lets me authorize sucessfully and shows me my account information.
I have emailed iTunes support about this and they replied with a generic answer about Deauthorizing and re-authorizing the computer.
I even tried, to no avail, the tips here...
http://discussions.apple.com/thread.jspa?threadID=471237&tstart=30
If anybody reads all this and has any new info for us, please take the time to post it here!
PowerMac G4 Mac OS X (10.4.6) -
I've tried the listed troubleshooting procedures to activate Facetime and iMessage, but no luck. Are there any other options? If it helps, I'm currently overseas and only using WiFi to connect.
lovethoseleaves,
Oh no! I am saddened to hear that you are having troubles with your MMS pictures. I know that this can be an important thing to be able to do. I appreciate you working with us to get this matter resolved as well. I see that you have spent time working with us, and I know that can also be frustrating. There are a few things we can check though. Are these to any specific numbers or all? A factory reset certainly should've resolved this. We can check into the account set up as well for that if need be. Please share any additional details that you can think of. Thanks.
ErinW_VZWSupport
Follow us on Twitter @VZWSupport
Maybe you are looking for
-
Need help in understanding why so many gets and I/O
Hi there, I have a sql file somewhat similar in structure to below: delete from table emp;-- changed to Truncate table emp; delete from table dept;--changed to Truncate table dept; insert into emp values() select a,b,c from temp_emp,temp_dept where t
-
Flash error from Captivated swf files
I need to load swf files made in Captivate into a Flash file. Everything has gone smoothly except for a Multiple Choice quiz swf which shows this error in Flash: TypeError: Error #1009: Cannot access a property or method of a null object reference.
-
When I Run my applet in the local computer It works fine but when I upload the applet in remote server and run the applet I get this error in Java console and the applet is not displayed...Will any one help me to solve the problem Thank u Vijay IOExc
-
Dynamic scroll bar not visible
I created my text in a text file (saved as testtext.txt), then in Flash I added a dynamic text box (instance name: testtext) and dragged a scrollbar component (instance name: ttscroll) onto it. I then added this action script to the first frame: ttsc
-
Error while configuring owb respository
i have oracle 9i v. 9.2.0.1.0 at server side and i have installed client for this at one cleint now whie i have tried to install owb 10g cleint at cleint pc and configure repository at client then it gives error after 94 % like the warehouse builder