Jump to content

marknt

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

About marknt

  • Birthday 11/15/1984

Profile Information

  • Gender
    Male
  • Location
    Philippines

marknt's Achievements

Member

Member (2/5)

0

Reputation

  1. Hello guys, I'm using symfony framework. How can I access the 'table2.fieldname' in my indexSuccess.php? I can't figure out how to use the getSfGuardUser() function. Maybe there's a way to access the 'table2.fieldname'? I have been searching the online doc but to no luck I couldn't find the solution I'm looking for. SQL Query SELECT gi.title, up.first_name, up.last_name, t.shirt_image FROM game_image gi LEFT JOIN user_profile up ON up.user_id = gi.user_id LEFT JOIN team t ON t.team_id = up.team_id action.class.php <?php $pager = new sfPropelPager('GameImage', ; $c = new Criteria(); $c->addJoin(GameImagePeer::USER_ID, UserProfilePeer::USER_ID, Criteria::LEFT_JOIN); $c->addJoin(UserProfilePeer::TEAM_ID, TeamPeer::TEAM_ID, Criteria::LEFT_JOIN); $pager->setCriteria($c); $pager->setPage($this->getRequestParameter('page', 1)); $pager->setPeerMethod('doSelect'); $pager->init(); $this->pager = $pager; ?> indexSuccess.php <?php foreach($pager->getResults() as $thumb){ ?> <?php echo $thumb->getTitle(); // table1 fieldname ?> <?php echo $thumb->getSfGuardUser()->getUserProfile()->getFirstName(); // table2 fieldname ?> <?php } ?> It returns an error Fatal error: Call to a member function getUserProfile() on a non-object in indexSuccess.php How can I solve this problem? :'( Thanks in advance.
  2. Hi all. I'm hoping someone here knows symfony framework and can help me solve my problem. Here's the link to my problem. http://www.symfony-project.org/forum/index.php/m/41798/#msg_41798 Thanks
  3. this is a test sample code. My real code is CI MVC with lots of models. <?php function rec_in_array($needle, $haystack, $alsokeys=false) { if(!is_array($haystack)) return false; if(in_array($needle, $haystack) || ($alsokeys && in_array($needle, array_keys($haystack)) )) return true; else { foreach($haystack AS $element) { $ret = rec_in_array($needle, $element, $alsokeys); } } return $ret; } $array = array( 0 => 'blue', 1 => 'red', 2 => 'green', 3 => 'red', 4 => array("sub1", "sub2") ); $key = array_search('green', $array); // $key = 2; $key = array_search('red', $array); // $key = 1; $yo = array_search('sub1', $array); echo "<br><b>dito = $yo</b><br>"; $key = rec_in_array('sub2', $array); print_r(array_keys($array)); echo "<pre>"; print_r($array); echo "</pre>"; echo "<br>" . $key . "<hr color=green>"; ?>
  4. Hi guys I need your help. Guys I have this print_r array Code: <? [2] => Array ( [ 0 ] => Array ( [_parent_name] => User_model [user_code] => jdelacruz ?> The [2] there is the main array key and I used a function to search the jdelacruz value. So the function will return true but I need to find the array key which is [2] and store it in a variable. How can I do that? Any suggestions? Thanks in advance
  5. try this mysql_query($query) or die(mysql_error());
  6. WOW!!! Thanks!!! Now that's what i'm talkin about. Thanks again sir redarrow
  7. aaawwww..*sigh*..., i thought that there's a PHP way. Thanks for the reply ultrus. I guess they'll just have to set it manually in order to disable the URL and page numbering when they print it out.
  8. Hello guys. I'm doing a report and already used the window.print() javascript function. But at the upper right of the page appears the URL of the php file to print and at the lower left is the page number. I want to disable them. I have checked the page setup in firefox and you can disable it manually. My question is is there anyway i can access the page setup via PHP so that i can disable the added URL and page numbering in my page when i print it out? Thanks in advance! More power
  9. [quote author=fert link=topic=124813.msg517711#msg517711 date=1170216355] Javascript [/quote] Can you pls give me some example of it? Thanks  :)
  10. Hello people. Anyone can give me an overview or sample code on how to do this one? ---> http://www.apple.com/downloads/dashboard/ <ul><li> dependencies I have a project related to that one. Please help. Thanks in advance.
  11. Ok, I this is my code that Translates server time into client localized time based on client's chosen offset. And it works. [code] <?php define('TIMENOW',time()); function translate_time($_offset,$_time = TIMENOW) { $_offset_secs = $_offset * 3600; return $_offset_secs + $_time; } $model_timeoffset = -3; $clients_time = $admin->translate_time($model_timeoffset,TIMENOW); $servers_time = date("F d, Y l g:i A"); $gmt_time = ? ?> [/code] How can I convert the client's time to the current GMT time? Thanks Cheers [img]http://i91.photobucket.com/albums/k310/marknt/36_1_211.gif[/img]
  12. [quote author=heckenschutze link=topic=114369.msg466406#msg466406 date=1163230963] The image is still going to have the same size, byte wise... Not sure that's what he's after. :) [/quote] Yes you are correct. Same size but in thumbnail view. For example resize it by minus 25% but same size
  13. :o Im so sorry I didn't see it crap hehe
×
×
  • 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.