You're right !!! I've an error !! > [Error: Patio error : Unable to convert date: 0000-00-00] >
I've two columns with Date type. I need to put date like this '2012-01-01' ? for my test i just put an empty value to insert a data. if I want to made this MySQL request, how can I do this with your module ? > SELECT * FROM Device AS dev JOIN PushID AS pid ON > dev.macAddress=pid.idDevice JOIN State AS state ON > pid.deviceToken=state.pushId JOIN Message AS msg ON > state.messageId=msg.idMessage WHERE dev.macAddress='xxxxxx' AND > msg.idMessage=xx > Thank you for your fast reply !!! Le jeudi 29 mars 2012 18:33:51 UTC+2, Douglas Martin a écrit : > > Then .then method takes two arguments a callback, and errback. Right now > you are not handling the error condition, so Im not sure that an error isnt > being thrown. try adding a second method to the .then that handles an error. > > .then(function(object){ > > if(object){ > > util.log('OBJECT : ' + object['macAddress']); > > } else { > > util.log('This message doesn\'t exist for ' + macAddress + ' >> device'); > > >> response.writeHeader(404, { > > 'Content-Type': 'text/xml' > > }); > > response.end('<status><code>404</code><description>Message not >> found</description></status>'); > > } > > }, function(error){ > > console.error(error); > >> }); > > > > > On Thursday, March 29, 2012 9:29:42 AM UTC-5, FluxB0x wrote: >> >> I need your help and it's urgent please !! >> >> I want to retrieve one record. Into phpMyAdmin this request run >> perfectly, but when i'm using your module with these lines don't work ... >> How can i retrieve the record that i want ? Thanks >> >>> >> >> var Device = db.from('Device'); >> >> util.log(db.from('Device').sql); >> >> var DevicePushIDStateMessage = Device.join('PushID', {idDevice: >>> sql.macAddress}).join('State', {pushId: sql.deviceToken}); >> >> util.log(Device.join('PushID', {idDevice: >>> sql.macAddress}).join('State', {pushId: sql.deviceToken}).sql); >> >> util.log(DevicePushIDStateMessage.filter({macAddress: macAddress, >>> messageId: idMessage}).sql); >> >> >>> DevicePushIDStateMessage.first({macAddress: macAddress, messageId: >>> idMessage}).then(function(object){ >> >> if(object){ >> >> util.log('OBJECT : ' + object['macAddress']); >> >> } else { >> >> util.log('This message doesn\'t exist for ' + macAddress + ' >>> device'); >> >> >>> response.writeHeader(404, { >> >> 'Content-Type': 'text/xml' >> >> }); >> >> response.end('<status><code>404</code><description>Message >>> not found</description></status>'); >> >> } >> >> }); >> >> -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to nodejs@googlegroups.com To unsubscribe from this group, send email to nodejs+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en