User Profile

Collapse

Profile Sidebar

Collapse
fishnfrogs
fishnfrogs
Last Activity: Aug 24 '11, 11:28 PM
Joined: Nov 20 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • fishnfrogs
    started a topic caching index.php file
    in PHP

    caching index.php file

    Hi everyone! I have another weird question. I'm working on my site where the information won't be changing very often, and it's not horribly important that after a change that the information is currently available. With that said, I've started caching my sql calls as a JSON text file. This lead me to start thinking that maybe I should do that with my index file as well. Is there any real benefit to doing this? So instead of the user coming to my...
    See more | Go to post

  • how are you importing the video...are there any errors
    See more | Go to post

    Leave a comment:


  • fishnfrogs
    replied to mysql update not working inside loop
    in PHP
    Here's my PHP code -- just in case

    Code:
    set_time_limit(0);
    ini_set("max_execution_time", 0);
    ini_set('memory_limit', '400M');
    
    require_once 'my_db_stuff.php';
    
    $path = $_SERVER['DOCUMENT_ROOT'] . '/path_to_files/';
    $fileArray = array();
    
    $fileName = $_POST['name'] . '.txt';
    $table = $_POST['table'] . '_temp';
    $bool = $_POST['bool'];
    
    $array = array();
    ...
    See more | Go to post

    Leave a comment:


  • fishnfrogs
    replied to mysql update not working inside loop
    in PHP
    Hi, thanks for your respsonse. I put an 'or die(mysql_error ())' on my update statement but I still don't get any response. I'm trying to update 1000 rows at a time. Is this too big for PHP or something? Also, if I wanted to check if mysql_affected_ row === 0, would I go under my if($res != false) or under the else statement? I feel like this project has been like pulling teeth since day one. Nothing is going smoothly. Anyway, thanks again for...
    See more | Go to post

    Leave a comment:


  • fishnfrogs
    started a topic mysql update not working inside loop
    in PHP

    mysql update not working inside loop

    Hi, I can't figure out why this isn't working. I'm trying to loop through an array and do a mysql update. However, it doesn't work.

    Code:
    for($i = 0; $i < $len; ++$i)
    {
    	$param = $array[$i] . '%';
    	$query = "UPDATE `$table` SET `bool` = '$bool' WHERE `user` LIKE '$param' LIMIT 1";
    	$result = mysql_query($query);
    	if (mysql_affected_rows() === 0)
    	{
    		mysql_free_result($result);
    ...
    See more | Go to post

  • http://net.tutsplus.com/tutorials/ot...e-twitter-api/ :)
    See more | Go to post

    Leave a comment:


  • Hmm...I wonder what was wrong with my writing. Anyway, I came across the text/enriched aspect of sending a mulitpart email. I think that's what I was talking about/looking for. I just remember that I got an email from like CGSociety and it defaulted with a nice layout of just background colors and text. I had to click to view the images which changed the whole layout. And yeah, I just realized my webmail can display messages like that yesterday,...
    See more | Go to post

    Leave a comment:


  • fishnfrogs
    started a topic multipart email with php -- multipart question
    in PHP

    multipart email with php -- multipart question

    Howdy ya'll!! I'm using PHPMailer to send out a multipart email. My first question is what is the best way to test the alternate text? I've tried sending it to different email accounts to see if any of them will block the HTML and none do -- which I guess is good. My second question is that I've received emails before that have a full HTML layout with images, but they also have a basic HTML backup, and finally a text backup. How is this achieved?...
    See more | Go to post

  • Hi, yeah, I've been able to load other records. It seems to be fine loading the records with a higher index. When I try to load the first row, I get the problem of the empty result. In my file, I have code that will fire when the empty row is returned, so I know that's where my issues are.
    See more | Go to post

    Leave a comment:


  • MySQL timing out when selecting one record out of 9 million

    Hi, I just uploaded 9 million records to a mysql table. The table consists of an id, a name, and a numeric value. The way its supposed to work is that the user passes the name to php and php returns the numeric value. However, either mysql or php is timing out -- I think. Here's what I've got so far:

    Code:
    $query = "SELECT `value` FROM `table` WHERE `name` = '$q' LIMIT 1";
    
    $result = mysql_query($query)
    ...
    See more | Go to post

  • The issues aren't coming from loading the file or the query string. All those seem to work fine. I'm guessing it's something else. I also tried making one long query string, but I either got the 500 error or the packet was too big for mysql. Then I tried to break it up into smaller arrays, and use a counting system and do smaller queries. I only got to 500k before my friend the 500 internal server error came calling again. *Sigh* It looks...
    See more | Go to post

    Leave a comment:


  • Hi, I'm running into a 500 Internal Server Error. I get about 50 to 80k in, and the server throws that error. Here is the code I'm currently using:

    Code:
    <?php
    
    set_time_limit(0);
    ini_set("max_execution_time", 0);
    
    require_once 'database_creds.php';
    	
    $mysqli = new mysqli($hostname, $username, $password, $database);
    if (mysqli_connect_errno())
    {
      	printf("Connect
    ...
    See more | Go to post

    Leave a comment:


  • I'll give it a try and post back. THANKS!!!!!
    See more | Go to post

    Leave a comment:


  • Hi, thanks for the response. I have played around with prepared statements before. However, I'll be doing this online. Wouldn't I have to worry about PHP timing out? For the life of me, I have never been able to change the timeout of my PHP scripts. Thanks!!
    See more | Go to post

    Leave a comment:


  • Insert 1 million rows from text file into MySQL database

    Basically, I need to insert a million rows into a mysql table from a .txt file. The "easiest" way I can think about doing this is loading the file into an AIR application and have it strip down into 1000 workable .txt files of 1000 lines. Then after that is done, use the app to upload each file one after the other in a loop. Can anyone tell me if there is an easier, more efficient way of doing this. I really don't want to have to go...
    See more | Go to post

  • Hi, thanks for the response. I'm googling around and trying to find information on the CLI. From what I've read so far, it isn't for a web server. Also, I don't think I have access to the php.ini file. I have tried using set_time_limit function and passed it both 0 and 240, but to no avail. My error.log is giving me the 'Premature end of script headers:' error. If there are any more suggestions or questions, I'd appreciate it. I'm going to...
    See more | Go to post

    Leave a comment:


  • fishnfrogs
    started a topic generating 1500 files to the server via php
    in PHP

    generating 1500 files to the server via php

    Hi all! I have some data on my database that only gets update once a month. I'm interested in caching that data to xml and storing on my server so that the database isnt being called everytime someone visits the site. Instead, itll just load the newest version of the xml. I have it all set up to work correctly, however, I'm getting an Internal Server Error when I tried to write around 100 files to the server. I stored all the Sql queries into an...
    See more | Go to post

  • fishnfrogs
    started a topic corrupt images

    corrupt images

    Hi, Ive been pulling my hair on this one -- who hasnt. Im encoding a jpg using the JPGEncoder and the same code that is out there on the internet.

    AS:
    Code:
    var jpgSource:BitmapData = new BitmapData (sw, sh);
    			jpgSource.draw(root);
    			var namae:String = TITLE.replace(/[\s]/g, "-");
    			var jpgEncoder:JPGEncoder = new JPGEncoder(90);
    			var jpgStream:ByteArray = jpgEncoder.encode(jpgSource);
    ...
    See more | Go to post

  • Hi, thanks for the reply. I actually ended up using a single query string and using a loop to concatenate to it. It all seems to be working quite well. It look my load time from about 15 seconds to about 2. YAY!
    See more | Go to post

    Leave a comment:


  • fishnfrogs
    started a topic retrieving multiple values with one mysql query
    in PHP

    retrieving multiple values with one mysql query

    Hello everyone! I have an app that uses a for loop to go through an array and it selects all the values from my MySQL database and returns the values. I can't imagine that this is the best approach. My code kinda looks like this:

    Code:
    $array = array('blah', 'bleep', 'bloop');
    $password = 'same_value_for_each_item_in_the_array';
    $name = 'same_value_for_each_item_in_the_array';
    
    $userArray = array();
    ...
    See more | Go to post
No activity results to display
Show More
Working...