abazoskib
-
Posts
548 -
Joined
-
Last visited
Never
Posts posted by abazoskib
-
-
i have a table that just recently got a surge of new data, and im pushing around 10million records. i feel like partitioning my data would definitely help with query speed, so i was wondering if anyone has personal experience with partitioning, and if there is an actual improvement.
-
use onchange, i believe, for the checkbox. when its value is checked enable to submit button.
-
there are three parameters to the word wrap function. 1. the string you are wrapping. 2. the number of characters to wrap after. 3. the character to use to seperate the lines. i.e. <br/> for html, or "\n" for UNIX, etc
-
go to about:config and try changing network.http.use-cache to false. then try it
-
go to tools >> error console. See if Firefox is reporting any errors
-
sometimes looking at the code wont work. why dont you try attacking your form?
-
scandir() - to scan a folder for other folders/files
is_dir() - to check if a folder is a directory, as opposed to being a file
is_file() - check if it is a file
you'll also need to be able to parse the folder names using explode() or regex/eregi
-
Ajax is used to run php scripts without reloading the page(for the most part). If you want to simply hide elements of a page, use regular Javascript.
-
use touch() to create a lock file -- a blank file, with any name you want.
at the very beginning of the script check for the existence of the lock file(is_file()), if it exists exit(), else proceed
then use unlink() to remove the lock file when the script is complete
-
You can probably implement that yourself. It's not a ton of work, just do some searching for a prewritten javascript calendar/date picker.
-
APC can be used to cache data and objects in memory, but those data and objects are only shareable between different processes within the CGI environment. CLI scripts don't get to use APC for sharing, so there's a lot less benefit in using it. Memcache would be a better option than APC for sharing data/objects between CLI scripts.Yeah, php's cli is notoriously slow when compared to something like Python or Perl. I'm not sure APC would boost performance noticeably.I've never found PHP particularly slow as a CLI scripting engine, at least not when the code is tuned to be efficient.
code can ALWAYS be better. But thanks for the advice everyone.
-
Besides converting my scripts to Perl or Python, what would be a way to speed it up? I could use any speed increase.
-
Anyone have any positive experiences with APC? I run a lot of CLI php and I could use an extra boost in performance.
-
you could do this different ways. in mysql you can query the datetime field like so:
SELECT TIME(timestamp) as time...
which extracts the time part of that field for you to process, or you could parse your timestamp with PHP. I don't know much about regex or eregi, but I do know every date in your column will be of the form '2009-08-09 16:45:00' so you can explode that string at the space character. then do your calculations.
-
you should optimize regardless of how many users you have. use indexes on the information you are most likely to query and is also not a primary key. dont use select * unless you need every single field in that table. query the exact fields you need. other than that, without looking at your relations i cant say much more. if you have admin access, you could also play around with your mysql settings. show variables; will give you around 264 settings to play with.
-
I am sending data to a remote location and I want to optimize curl for speed. I do not need any return data.
Here's what I am using so far:
curl_setopt($ch, CURLOPT_URL, $url . $qry_str); curl_setopt ($ch, CURLOPT_NOBODY, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 10);
Are there any other setting I should look into for greatest speed?
-
i used this code in my httpd.conf file because i do not allow .htaccess. it isnt working.
-
I read a lot about Mondrian, nothing clear cut at all. How do I build my own OLAP system? Is it even worth it? Any help in this is greatly appreciated.
-
try removing the single quotes from around the 4.
-
its sup[posed to be
$id = $_GET['id']; $idFromOtherTable = $row['post_id']; $sql = "SELECT s.* FROM $table as s JOIN $table1 as a ON a.id = s.$id WHERE a.id = $idFromOtherTable ORDER BY s.submission_id DESC LIMIT 25";
-
why don't you put it into a file called myJS.js for example and do something like this:
<?php echo "<script type=\"text/javascript\">"; include('myJS.js'); echo "</script>"; ?>
Works for me usually and its easy to maintain.
-
$sql = "SELECT * FROM $one_table as o,$other_table as o2 WHERE o.tag='$id' AND o.tag=o2.tag ORDER BY id DESC LIMIT 25";
It's called a join. They can be a burden and/or an advantage depending on how you use them.
-
Why do you do 'die($sql2);' ?
-
aha! i was right, but couldnt have done it without all your help everyone. thanks!
Makes sense, since a select box is an HTML element not a space for text.
pre loading form from dropdown
in Javascript Help
Posted
im not very experienced with ajax, so im here to ask how i would be able to preload a form based on a dropdown list of Id numbers. so if i select id 3467 from my dropdown, the information gets loaded into the form for editing. i think my more specific question is what should my php script return?