Jump to content

hybmg57

Members
  • Posts

    52
  • Joined

  • Last visited

    Never

Everything posted by hybmg57

  1. Hi, In Magento... My reload price function is not working and I cannot get price to change when items are selected in the drop down box. Below are a couple of errors that I am getting. Any help would be much appreciated... The link is: http://www.playerspriority.wmetools.com/shop/index.php/pro-peptide.html optionsPrice is undefined anonymous()configurable.js (line 285) anonymous()configurable.js (line 137) anonymous()configurable.js (line 121) anonymous()prototype.js (line 214) anonymous()prototype.js (line 3974) optionsPrice.changePrice('conf...rice': price, 'oldPrice': oldPrice}); config is undefined initialize()product.js (line 550) config = undefined klass()prototype.js (line 51) pro-peptide.html()pro-peptide.html (line 599) this.productId = config.productId;
  2. Hi I need to create a leaderboard with Cakephp. There are tables already set up. They are six controllers (region) which have an add function to put data into separate tables (region). In this add function I have to check if the user's score is greater than any score in the leader board table, if so insert the new score and delete the last entry. How do I do this? If someone can help me with the code it would be greatly appreciated!
  3. Hi all, Is there a way we can show multiple columns to select when selecting belongsto values in edit.ctp view rather than just column named with "name"?
  4. Hi, I'm getting this error and I can't seem to figure it out. Can someone help me on this? Notice ( : Undefined property: LaborTracker::$Staff [APP/controllers/labor_trackers_controller.php, line 31] Code LaborTrackersController::add() - APP/controllers/labor_trackers_controller.php, line 31 Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 204 Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 171 [main] - APP/webroot/index.php, line 83 Fatal error: Call to a member function find() on a non-object in /var/www/hotel/controllers/labor_trackers_controller.php on line 31 labor_tracker.php <?php class LaborTracker extends AppModel { var $name = 'LaborTracker'; //The Associations below have been created with all possible keys, those that are not needed can be removed var $belongsTo = array( 'Staffs' => array( 'className' => 'Staffs', 'foreignKey' => 'staffs_id', 'conditions' => '', 'fields' => '', 'order' => '' ), 'Jobs' => array( 'className' => 'Jobs', 'foreignKey' => 'jobs_id', 'conditions' => '', 'fields' => '', 'order' => '' ) ); } ?> labor_trackers_controllers.php <?php class LaborTrackersController extends AppController { var $name = 'LaborTrackers'; function index() { $this->LaborTracker->recursive = 0; $this->set('laborTrackers', $this->paginate()); } function view($id = null) { if (!$id) { $this->Session->setFlash(__('Invalid labor tracker', true)); $this->redirect(array('action' => 'index')); } $this->set('laborTracker', $this->LaborTracker->read(null, $id)); } function add() { if (!empty($this->data)) { $this->LaborTracker->create(); if ($this->LaborTracker->save($this->data)) { $this->Session->setFlash(__('The labor tracker has been saved', true)); $this->redirect(array('action' => 'index')); } else { $this->Session->setFlash(__('The labor tracker could not be saved. Please, try again.', true)); } } $staffs = $this->LaborTracker->Staff->find('list'); $jobs = $this->LaborTracker->Job->find('list'); $this->set(compact('staffs', 'jobs')); } function edit($id = null) { if (!$id && empty($this->data)) { $this->Session->setFlash(__('Invalid labor tracker', true)); $this->redirect(array('action' => 'index')); } if (!empty($this->data)) { if ($this->LaborTracker->save($this->data)) { $this->Session->setFlash(__('The labor tracker has been saved', true)); $this->redirect(array('action' => 'index')); } else { $this->Session->setFlash(__('The labor tracker could not be saved. Please, try again.', true)); } } if (empty($this->data)) { $this->data = $this->LaborTracker->read(null, $id); } $staffs = $this->LaborTracker->Staff->find('list'); $jobs = $this->LaborTracker->Job->find('list'); $this->set(compact('staffs', 'jobs')); } function delete($id = null) { if (!$id) { $this->Session->setFlash(__('Invalid id for labor tracker', true)); $this->redirect(array('action'=>'index')); } if ($this->LaborTracker->delete($id)) { $this->Session->setFlash(__('Labor tracker deleted', true)); $this->redirect(array('action'=>'index')); } $this->Session->setFlash(__('Labor tracker was not deleted', true)); $this->redirect(array('action' => 'index')); } function admin_index() { $this->LaborTracker->recursive = 0; $this->set('laborTrackers', $this->paginate()); } function admin_view($id = null) { if (!$id) { $this->Session->setFlash(__('Invalid labor tracker', true)); $this->redirect(array('action' => 'index')); } $this->set('laborTracker', $this->LaborTracker->read(null, $id)); } function admin_add() { if (!empty($this->data)) { $this->LaborTracker->create(); if ($this->LaborTracker->save($this->data)) { $this->Session->setFlash(__('The labor tracker has been saved', true)); $this->redirect(array('action' => 'index')); } else { $this->Session->setFlash(__('The labor tracker could not be saved. Please, try again.', true)); } } $staffs = $this->LaborTracker->Staff->find('list'); $jobs = $this->LaborTracker->Job->find('list'); $this->set(compact('staffs', 'jobs')); } function admin_edit($id = null) { if (!$id && empty($this->data)) { $this->Session->setFlash(__('Invalid labor tracker', true)); $this->redirect(array('action' => 'index')); } if (!empty($this->data)) { if ($this->LaborTracker->save($this->data)) { $this->Session->setFlash(__('The labor tracker has been saved', true)); $this->redirect(array('action' => 'index')); } else { $this->Session->setFlash(__('The labor tracker could not be saved. Please, try again.', true)); } } if (empty($this->data)) { $this->data = $this->LaborTracker->read(null, $id); } $staffs = $this->LaborTracker->Staff->find('list'); $jobs = $this->LaborTracker->Job->find('list'); $this->set(compact('staffs', 'jobs')); } function admin_delete($id = null) { if (!$id) { $this->Session->setFlash(__('Invalid id for labor tracker', true)); $this->redirect(array('action'=>'index')); } if ($this->LaborTracker->delete($id)) { $this->Session->setFlash(__('Labor tracker deleted', true)); $this->redirect(array('action'=>'index')); } $this->Session->setFlash(__('Labor tracker was not deleted', true)); $this->redirect(array('action' => 'index')); } } ?>
  5. Hi, I'm getting below error in my page http://www.cidirealty.com/NWMLS/mls.php PHP Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in E:\USERS\cidirealty\www\NWMLS\mls.php:54 Stack trace: #0 E:\USERS\cidirealty\www\NWMLS\mls.php(54): SimpleXMLElement->__construct(' Does anyone know what this means and how to solve this? Thank you.
  6. Hi, my PhpMyadmin does not allow XML import as a selectable option. Is there anyone familiar with importing XML into MySQL database? Thank you Jae
  7. hybmg57

    XML import

    Hi, my PhpMyadmin does not allow XML import as a selectable option. Is there anyone familiar with importing XML into MySQL database? Thank you Jae
  8. Hi all, I have a CSV file that needs to be imported to MySQL but the problem is that the limit is only 10mb whereas my CSV file is 550mb... I've asked hosting provider to temporary increase the import limit, but this did not work. Is there any fast way to split them into 10mb files and import them automatically? Thank you. Jae
  9. Hi fenway, What do you mean by CSV ENGINE type? Sorry I'm a beginner.
  10. Hi, Is there a way we can use PHP script to insert a CSV file into MySQL with CSV's first row as field names in MySQL?
  11. I have asked the hosting provider and they said it is not possible with cPanel. Is there a tutorial that you could share with us? Thank you for your help.
  12. How do you parse the emails in cpanel? I'm sorry I'm a beginner and cannot exactly understand what you mean. Thank you for you help... Kind regards, Jae
  13. Hi All, Is there a way we can write a PHP script to automatically read receive emails, extract csv file attachment from there and insert into MySQL database then run this in Cron Jobs to automate the process?
  14. Hi All, Is there a way we can write a PHP script to automatically read receive emails, extract csv file attachment from there and insert into MySQL database then run this in Cron Jobs to automate the process?
  15. FXP is great! This is the definition that I'm after! But how would you do FXP in PHP?
  16. Hi, great thoughts! But the problem is that the remote server(the one that I'm retrieving files from) is not accessible for me to make any scripts on it... Any other way?
  17. Hi, Thanks for the reply. No I have two different remote servers and I would like a script that is run by one server, and when run, the files are transferred to the other server in a specific folder and file name.
  18. Yes I did but I would like a way we can transfer files directly to the server without downloading to my local drive first. I think we could save a file in temp when downloading and then use this temp file to ftp_put into the server. I just wanted a server to server transfer...
  19. Hi, I would like to transfer some jpg image files from FTP server to my local server and I would like this to be done in a PHP script but I cannot figure out a way to do this without saving in my local harddrive. If anyone have any ideas and share this with us that would be very much appreciated!!! Thank you. Kind regards, Jae
  20. Apparently I heard that it gets timed out due to time it takes for executing the insert command. Is there a way we can tackle this?
  21. Below is the code and this is the site: http://test6.favstay.com/ <?php include ('db.php'); include ('mls.php'); soapImportNWMLS("Listing","Residential","2010-12-14T12:00:00","2010-12-14T23:59:59","","","",""); print_r($dataArray); foreach($dataArray[RESI][Residential] as $data){ foreach($data as $key1 => $data1){ echo $key1." = ".$data1."<BR>"; $key2[] = "`".$key1."`"; $data2[] = "'".$data1."'"; } $key1 = mysql_real_escape_string(implode(", ",$key2)); $data1 = implode(", ",$data2); echo "<br>".$key1."<br><br>"; echo $data1."<br><br>"; mysql_query("INSERT INTO RESI ($key1) VALUES($data1)") or die(mysql_error()); } ?>
  22. Hi, I have a very large multi-dimensional array to be inserted into MySQL database. It keeps up coming up with "MySQL server has gone away" error. I heard that I need to change the MySQL data limit but my hosting provider does not allow me to do so. I was thinking maybe input bit by bit but I wasn't 100% sure the best way of doing this. What is the best way do you think?
  23. Hi, I was wondering if there was a way to insert array variables inside foreach to MySQL. Below is my code so far but it doesn't work. Thank you. <?php include ('db.php'); include ('mls.php'); soapImportNWMLS("Listing","Residential","2010-11-20T00:00:00","2010-11-23T23:59:59","","","",""); foreach($dataArray[RESI][Residential] as $data){ foreach($data as $key1 => $data1){ echo $key1." = ".$data1."<BR><BR>"; $key1=array($key1); $data1=array($data1); } print_r($key1); mysql_query("INSERT INTO RESI ($key1) VALUES($data1)") or die(mysql_error()); } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.