bh
Members-
Posts
238 -
Joined
-
Last visited
Everything posted by bh
-
I ran a micro test. In a 20K rows table (id, name): SELECT * FROM xyz LIMIT 19998, 2 ~0.0065s SELECT * FROM xyz ORDER BY id DESC LIMIT 0, 2 0.0002s The 2nd is much faster Your right (And at first, still no the count(*) ) [edit] Its understandable, cuz the ids are in sequence (1, 2, 3... 7, ... almost nothing to order.
-
@Mchl: yeah, its another solution, but why do you want to order the entire table? if id is a pk thats up to speed, is ok, but i think the counting and then the limit is much lower cost, than your order by.
-
Can someone tell me why my pho form code is not showing on the web?
bh replied to oavs's topic in PHP Coding Help
You have an 1x1 image what do you want to see in your page? You'll see an 1x1 image in the top left corner... -
Can someone tell me why my pho form code is not showing on the web?
bh replied to oavs's topic in PHP Coding Help
Hi, I suggest to you to start from here: http://www.w3schools.com/html/ -
Hi, Count your rows and then use LIMIT. LIMIT offset, row count Your offset will be "Rownums"-2 so LIMIT "Rownums"-2
-
Yeah, sure. Ask Google?: http://www.google.hu/search?sourceid=chrome&ie=UTF-8&q=php+session http://www.google.hu/search?sourceid=chrome&ie=UTF-8&q=php+session+tutorial
-
Hi, Is there an error message? -> http://www.phpfreaks.com/forums/index.php/topic,129174.0.html !
-
How can I put all post in an array and store them...
bh replied to phpretard's topic in PHP Coding Help
Hi, I think you should starting with the forms structures. You use one form now for those datas. Rather you should use more forms (structured by logically isolated parts). You would to show over the users through the forms... Example: Personal details Human resources details ... -
Hi, First: Use JOIN Second: Use Indexes. (create index those columns whereat you runs search - in your code: Type and length)
-
Hi, Dont you heard about database normalization yeah? [off] -> yeah, some data [/off]
-
Hi, Its a great question and exciting at all. Heres a simple example what im just done: class class_a extends class_b { public function func_a() { echo 'm'; return $this; } } class class_b { public function func_b() { echo 'n'; } } $a = new class_a(); $a->func_a()->func_b();
-
Sadly theres no such a thing as ROWNUM or ROWID in MySQL. Im only guessing, but ive had an idea, and this is the result. SET @num = 0; SELECT (@num:=@num+1) AS abc, id, name FROM user__group GROUP BY abc HAVING abc > 2 AND abc < 4 @num is the alternate of ROWNUM. You cannot use @num in the WHERE clause, so you need the GROUP BY clause for the HAVING...
-
This is wrong: -> Its from MySQL manual:
-
Hi, Try this: ORDER BY 'post_date' DESC"
-
Put it in your first script which always runs.
-
If it is not necessary (IMO) you dont have to use Regexp at all costs. If your links always likes <a href="...">...</a> than use substr.
-
Hi, in PHP: http://php.net/manual/en/function.date-default-timezone-set.php in php.ini: date/Default timezone
-
Whats the error message? Anyway you should set strings into quotes: $query='UPDATE users SET name=\''.$_POST['username'].'\', ...
-
Anyway its away from the topic. You can get wether the copy was success or failure: From php manuls: http://php.net/manual/en/function.copy.php And you can check the copy was whether successed example with http://php.net/manual/en/function.file-exists.php
-
Again from php manuals: So, please... http://php.net/manual/en/function.move-uploaded-file.php
-
"SELECT DISTINCT keywords FROM Core WHERE keywords LIKE '$letter%' AND Amount>=1 AND ({$adult}) ORDER BY keywords DESC"
-
From the php manual for the move_uploaded_file function: 'valid uploaded file' = php runs the is_uploadedfile function within move_uploaded_file function. So mainly the move_uploaded_file is better when you want to move an uploaded file, cause security issues.
-
Hi, if($adulton == 1) { $adult="adult=1 AND adult=0"; } Here, adult can be 1 and 0 at the same time. User OR connection. if($adulton == 1) { $adult="adult=1 OR adult=0"; }
-
Theres a lot of choiches. Two of them: http://php.net/manual/en/function.file-get-contents.php http://php.net/manual/en/function.file-get-contents.php and google!!!: http://www.google.hu/search?sourceid=chrome&ie=UTF-8&q=php+file+read