Wednesday 15 August 2012

php - Run Postgresql function in Cakephp -


OK, I'm trying to run this postgrescill function through a Cuckfp app shell class.

  build or re-disclosure rdcdev.populatetemptables () declaration of the last sync date as the date of return; Start the final sync in rdcdev.syncsettings with lastsyncdate; INSERT (SENDED * FROM rdcdev.sourcelists) in Rdcdev.temp_sourcelists; Include in Rdcdev.temp_beamdatas (select rdcdev.beamdatas WHERE temp_beamdatas.datetime & gt; lastsync); INSERT in Rdcdev.temp_beams (SELECT * FROM rdcdev.beams WHERE temp_beams.datetime & gt; lastsync); Insert in Rdcdev.temp_logdatas (select rdcdev.logdatas WHERE temp_logdatas.datetime & gt; lastsync); INSERT (SENDED * FROM rdcdev.paramdatasWHERE temp_paramdatas.datetime & gt; lastsync) in Rdcdev.temp_paramdatas; Previous sync back; End; 'Language' plpgsql '; As you can see, this is quite a few things that I can be able to call all of these by calling a function instead of calling them in a cakepipe call. I have verified that the function is working with the purpose of making a call through the command line, but it does not like calling a call through a query call in the kppp:  
  class SyncShell AppShell Expands {... .blah blah blah $ SQLcommand = "SELECT rdcdev.populatetemptables ();" ;;; $ This- & gt; Syncsetting-> Query ($ SqlCommand); }  

The sync setting is just one of the data models in the database. The code seems to crash just because there is no error in the KPPP log, so I find it difficult to find out why it does not like it. That's because the function is working with tables outside SyncSettings. If so, then I need to make a model class for something in the folder folder in Cakephp's folder folder, or there is a specific way to call the function in the capef that my primary Google-foo has been unable to find.


No comments:

Post a Comment