Fatal error: Call to a member function findByFromApplication() on a non-object

Posted January 8th, 2009 in PHP, Programming by Louie Miranda

Geez! I posted this on cakephp mailing list, hoping to find a solution to my problem. Basically, I do wanted to display a small category of applications using an ID. But, weird error keeps popping out of my result.

http://groups.google.com/group/cake-php/browse_thread/thread/f0cc9ab09241f2a4

Attaching a file on CakePHP!

Posted December 5th, 2008 in PHP, Programming by Louie Miranda

This is how I attached a file on CakePHP!

$this->Email->filePaths = array(‘/www/axishift/app/webroot/files/’);
$this->Email->attachments = array(‘attachment.txt’);

[EVENT] Zend Framework Workshop – [11.29.2008] Saturday

Posted November 25th, 2008 in Events, Programming, Social Networking by Louie Miranda

PHPUGPH is having a Zend Framework Workshop at Tech Bar/G2VC Innovation Center, 5th Floor, The Orient Square, F. Ortigas Road (formerly Emerald Ave.), Ortigas Center, Pasig City this coming Sat (11/29/2008).

I really love to go! and learn more on ZF, however I am currently tied with different commitments at the moment makes me really sad :(

> posted, pa record nang video! :)

Continue Reading »

Limit feeds on simplepie using cakephp 1.2.x

Posted November 12th, 2008 in PHP, Programming, Projects by Louie Miranda

I am currently working on Simplepie and CakePHP 1.2.x. I have a working code that successfully display xml feeds from different remote sources, a sample can be viewed on my homepage. And, I can’t find how to limit it.

Continue Reading »

Book: Beginning CakePHP

Posted November 7th, 2008 in PHP, Programming by Louie Miranda

Beginning CakePHP

Just got a new book to read. This will surely help me speed up my learning curve with CakePHP.
CakePHP is a leading PHP–based web app development framework.

http://apress.com/book/view/1430209771

MAZDAtech Community!

Posted August 21st, 2008 in Cars, Personal, Projects, Social Networking by Louie Miranda

I became the webmaster of our car club MAZDAtech (formerly known as Protege Tech). Guys, thank you for trusting me.

I did upgraded the forum from phpBB2 to phpBB3! Hurray! :)

The new URL is http://mazdatech.org/community/

Three alternating css class using PHP

Posted July 29th, 2008 in CSS, Programming by Louie Miranda

My code for three alternating class:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<div class=row_0>content here</div>
<div class=row_1>content here</div>
<div class=row_3>content here</div>
 
    <?php
    $i=0;
    foreach ($row as $data)
    {
    $i+1;
    $row_class = ($i % 3);
    //tpl class
    echo 'class=row_'.$row_class;
    }
    ?>

HTH

MySQL, Insert Select

Posted May 8th, 2005 in MySQL, PHP, Programming by Louie Miranda

I been working with a PHP function on how I can duplicate an entry on sql. My first approach was to use the while() function, but what it does was loop the entire process.

I posted at phpugph.com and ask them what they think, and they suggested the INSERT – SELECT of MySQL.

1
2
3
mysql> INSERT INTO jt_entry (uid,entry_requested_by,entry_status,entry_category,entry_title,entry_description)
select uid, entry_requested_by, entry_status, entry_category, entry_title, entry_description from jt_entry
where entry_id=3limit 1;

Query OK, 1 row affected (0.00 sec)
Records: 1 Duplicates: 0 Warnings: 0

Thanks!

Rounding fractions on PHP

Posted April 7th, 2005 in PHP by Louie Miranda

Part of my study on PHP; I found out that I can easily round fractions up or down, using function ceil() and floor(). Good thing i was able to read the manual first, hehe.

Read here:
http://ph.php.net/manual/en/function.ceil.php
http://ph.php.net/manual/en/function.floor.php

1
2
3
4
5
6
<?php
echo ceil(4.3); // 5
echo ceil(9.999); // 10
echo floor(4.3); // 4
echo floor(9.999); // 9
?>