Jump to content

_tina_

Members
  • Posts

    78
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

_tina_'s Achievements

Member

Member (2/5)

0

Reputation

  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!
×
×
  • 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.