PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
Aug 31, 2012 17:50
so, when there are hundreds of database rows, will join still be faster?
Aug 31, 2012 17:48
join is 50% faster all the time
Aug 31, 2012 17:48
SELECT bpoint.sName as name, bpoint.sAddr as adr ,bimages.iURL as url FROM bpoint, bimages WHERE bpoint.pointID = bimages.pointID AND bpoint.pointID IN ($input)

VS separate

SELECT iURL FROM bimages WHERE pointID IN($input)
SELECT sName, sAddr FROM bpoint WHERE pointID IN($input)
Aug 31, 2012 17:46
sec
Aug 31, 2012 17:45
ill show you
Aug 31, 2012 17:43
I wanted to ask if it is guaranteed that winning piece of code will be actually faster even when there are hundreds of rows in database.
Aug 31, 2012 17:41
Hey guys one question. I benchmarked two different mysql queries. Number 2 wins every time. Does it remain the same with database records increase?
Aug 31, 2012 12:09
hey guys can i please get some more opinions on this one stackoverflow.com/questions/12214864/…. Still not sure what is better to use. I got two completely different answers. Thanks :)
Aug 31, 2012 10:46
Thanks @markcial , @DaveRandom
Aug 31, 2012 10:42
Hey guys if you use foreach($data as $data => value) for indexes, can you still operate with the array data?
Aug 30, 2012 13:37
+ data depends on element you rollover
Aug 30, 2012 13:36
Hey guys, what is the best practice (performance) for rollover tooltips which contains for two different mysql queries of data: To load everything at the beginning or to fetch data with ajax only when needed ( on rollover ).
Aug 28, 2012 21:05
@Truth Okay i understand, thanks guys ;)) pays virtual beer
Aug 28, 2012 21:04
@Truth Yea, i know
Aug 28, 2012 21:02
@Truth But it is nothing wrong on my side right? I mean, many people just visit the front page, and thats a lot of new sessions for nothing.
Aug 28, 2012 20:58
Hey people. One question. I have the index page which is public so visitors dont have to be logged in. But it is also avaliable for logged in users. When i check if session exists (session_start), new session is created even though visitor dont want to log in. Should i somehow prevent this or is nothing wrong with that?
Aug 28, 2012 08:35
Hello guys. How can i set column default value to curdate? I tried with this, but it doesnt work. ALTER TABLE bnews MODIFY nDate date NOT NULL DEFAULT 'CURDATE()';
Aug 27, 2012 19:22
Hey guys. Can anyone tell me how to call table names like table.column with php? For example, when using just with column (without table name) it was like $row["column"]. Thanks
Aug 26, 2012 13:46
I need for month names
Aug 26, 2012 13:45
ok just a sec
Aug 26, 2012 13:44
@webarto yes
Aug 26, 2012 13:40
i use setlocale(LC_TIME, 'sl_SI');
Aug 26, 2012 13:40
Hey people. Does anyone know why setlocale() doesnt work with wamp?
Aug 25, 2012 15:40
Will try and come back later, thanks
Aug 25, 2012 15:39
firefox
Aug 25, 2012 15:38
Yes, the radio buttons with values are appended to the div container inside the form.
Aug 25, 2012 15:36
Hey people. Are ajax generated elements added to the dom? When i post to database, my ajax generated radio buttons are not detected....
 

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
Aug 28, 2012 12:28
:)
Aug 28, 2012 12:28
Yes, i will, thank you for your help
Aug 28, 2012 12:26
:)
Aug 28, 2012 12:26
Yes but that seems to be working, thanks
Aug 28, 2012 12:25
Yes, when the radio is clicked, the parent label is changed. And when the other radio is clicked, the first label is back to normal and the newly checked label changes etc
Aug 28, 2012 12:22
Hmm, text keeps being red all the time. Is there a way to make for example label border red WHEN radio is checked?
Aug 28, 2012 12:19
Hey people. Can anyone help me to get this working? $('.class input:checked').parent('label').toggleClass(...); I would like to add class to label, when its child radio is checked. Thanks
Aug 26, 2012 20:17
thanks
Aug 26, 2012 20:17
stupid me
Aug 26, 2012 20:17
oh ofcourse
Aug 26, 2012 20:16
error:_SyntaxError: missing ) after argument list
Aug 26, 2012 20:16
$(document).ready(function(){
    setTimeout(function(){
      location.replace('stop.php?stid=<?php echo $lastID; ?>');
    },3000);
};
Aug 26, 2012 20:16
Hey guys can you help me solve out why this doesnt work?
Aug 9, 2012 22:13
tnx
Aug 9, 2012 22:10
Hey guys what happens if you use .hide() on hidden div? Does action perform?
Aug 9, 2012 00:10
thanks again :))
Aug 9, 2012 00:10
Okay, thats all i wanted to know
Aug 9, 2012 00:09
Loop is intended to create <select> options
Aug 9, 2012 00:08
Ok i will explain the whole thing. I pass the parameter of month (from select) to php which calculates how many days is in that month. So, should i loop through all the days in php code (for days <select>) or should i just return the number of days and loop trough them in javascript.?
Aug 9, 2012 00:03
Thanks for the help :) Also, i have another small question. What is better/faster? To run loop in the php code (called by ajax), or just transfer parameters and loop them inside javascript?
Aug 9, 2012 00:00
I forgot to remove that code should not check the actual month
Aug 8, 2012 23:59
sorry guys
Aug 8, 2012 23:59
@Izzey Yes, there was a condition in the called php code.. :P