Jump to content

_tina_

Members
  • Posts

    78
  • Joined

  • Last visited

    Never

Everything posted by _tina_

  1. Still haven't been able to resolve this. I need, if a user clicks a link, a bd will be quieried and return send the rows to a csv file, which will then present the user with a doownload prompt. The problem being that when there are 10,000+ records, I get a php memory error. Is there a way around this at all? Thanks for the replies so far and thanks for reading
  2. I'm using Zend Framework, but this section is using straight PHP5, it's being migrated to ZF. So, this section, for now, will be done in straight PHP5.
  3. Thanks for the reply. Here is what I am doing: $this->setLayout(false); $q = Doctrine_Query::create() ->select('*') ->from('ContestSubmission s') ->leftJoin('Contest c ON s.id = c.contest_id') ->where('s.contest_id = ?', $request->getParameter('id')); $this->contest = $q->execute(array(), Doctrine::HYDRATE_ARRAY); $this->getResponse()->setContentType('application/msexcel'); This is done using a PHP framework btw. Regarding memory management, what would you suggest I do to rectify this?
  4. Hi, I'm trying to export to a csv/xls file. The user clicks a link, which calls a function that queries the database and prompts them with a download dialog. I have an array of results, everything works fine, BUT, when I have 8000+ results, I get a PHP memory error. Is there any way around this? Thanks in advance!
  5. Thanks Teamatomic, yes, this sweepstake is US based.
  6. Hi Teamatomic, Thank you for the reply. I'm actually looking for both. Thanks!
  7. Hi, I need to write a sweepstakes competition program. I'm not really sure how a sweepstakes works fully. Has anyone got any experience with this? Thanks in advance
  8. Hi, I am new to Cake and am trying to implement this state select box: - http://bakery.cakephp.org/articles/view/country-select-list-helper My form is like: echo $form->input('firstname'); echo $form->input('lastname'); etc. How do I make this work in my form? I have the helper in views/helpers. Any ideas? Thanks in advance!
  9. Great, thanks for the help
  10. Oh, okay, thank you for that. So when I upload this to a live server it will output the users ip? Thanks again.
  11. $_SERVER["REMOTE_ADDR"] ; Does anybody know why the above is returning "::1" rather than the ip address? Thanks in advance!
  12. Hi, Can anyone see what I'm doing wrong in the following code? My queries are coming back false. It connects fine, just the queries return false. Thanks in advance. <?php class database { private $connectlink; //Database Connection Link private $username = "root"; private $password = "root"; private $database = "test"; private $hostname = "localhost"; private $resultlink; private $rows; public function __construct() { $this->connectlink = mysql_connect($this->hostname,$this->username,$this->password); if(!($this->connectlink)) { throw new DatabaseConnectionException("Error Connecting to the Database".mysql_error(),"101"); } else { mysql_select_db($this->database); } } public function __destruct() { @mysql_close($this->connectlink); } public function query($sql) { $this->resultlink = mysql_query($sql); return $this->resultlink; } } ?> $db = new database(); $sql = "insert into test ( table ) values ( '".$val."' ); "; try { $res = $db->query($sql); } catch (Exception $ex) { echo "An error has occurred: " . $ex->getMessage(); }
  13. Hi, Does anybody have any examples of how to use Pears Crowd package? - http://pear.php.net/package/Services_Atlassian_Crowd/docs/0.9.5/Services_Atlassian_Crowd/Services_Atlassian_Crowd.html#var$crowd_client Thanks in advance!
  14. Thanks for all the replies guys. This is a huge help. Thanks again
  15. Hi, I have an array of email addresses, I'm trying to figure out how to check for duplicates. I have read various form posts on the topic but can't seem to get anything that works for me. Does anybody have any experience with this? Thanks in advance!
  16. Anybody have any idea on this one? Thanks again
  17. Hi, I'm trying to implement the slider in the following link: http://developer.yahoo.com/yui/examples/slider/slider_dual_with_highlight.html I know the code is all there, but is that all I need to make it work? Or do I need to include files with it? It says something at the very bottom of the page about loading necessary JS and CSS. Also, and this is the main problem I'm having. Is it possible to have the slider work with different ranges and different increments? For example, I want to make it be a range from 1.0 to 5.0 in increments of .5. So i.0, 1.5, 2.0, 2.5 etc. Is this possible? Thanks in advance for any help
  18. Edit, sorry, wrong section...
  19. Nevermind, figured it out. <?=$this->formSelect('var', $this->var, array('id'=>'var', 'multiple' => 'yes', 'size' => '3'), $var)?> Thanks
  20. Hi, I currently have in my view: <?=$this->formSelect('data[var]', $this->data['var'], array('id'=>'var'), $this->var)?> How can I make this a multi select box like: <select name=mytextarea size=3 multiple> I couldn't find anything in the documentation. Thanks in advance.
  21. Thanks for the replies. Yes, I'm sending via a cron job. The problem with a $loop_max variable is I have to send this to thousands of users so I don't know in advance what the max will be. Thanks again for the reply.
  22. I have a script which sends out emails every night at 12am. The problem is that the first and second email are going out together, rather than the first one day and the second the next day. Loop if(id == 1) send email increment id by 1 update database endif if(id == 2) send email increment id by 1 update database endif End Loop This is obviously going to send both the same night as the first if is incrementing the id so the 2nd if will be true. Is there a way around this? I have a "date_modified" field in a MySQL database which is updated after each email is sent. Could I use this somehow to help here? For instance: if (id == 1 & date_modified !> ... ? ) Any help would be appreciated. Thanks in advance.
  23. Nevermind, I see the problem. The "param name="movie"" had the wrong path! Thanks!
  24. Hi, I 'm having trouble getting this to show up in IE. <html> <head> <script language="text/javascript" src="../../includes/audio-player/audio-player.js"></script> </head> <body> <object type="application/x-shockwave-flash" data="../../includes/audio-player/player.swf" id="audioplayer1" height="24" width="290"> <param name="movie" value="audio/audio-player/player.swf"> <param name="FlashVars" value="playerID=1&soundFile=http://www.xxx.com/media/100709.mp3"> <param name="quality" value="high"> <param name="menu" value="false"> <param name="wmode" value="transparent"> </object> <br/> <p style="color:#555555"><i>Brian S. Interview</i></p> </body> </html> Can anybody see anything wrong that would make this happen? It runs fine in FF and Safari. Thanks.
  25. _tina_

    Rollovers

    Hi, I have a button as follow: #memberlogin .login{ background:url(/images/memberlogin_btn.gif) no-repeat left top; display:block; width:130px; height:31px; border:0; } I need to make a rollover. This is one image, same as this method: http://www.nowcss.com/links/image-rollover-with-css I tried it this way #memberlogin a.login span { display: none; } #memberlogin a.login:hover { background: url(/images/memberlogin_btn.gif) repeat 0px -31px; } but it's not working, do you know what I'm doing wrong here? Thanks in advance.
×
×
  • 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.