« first day (327 days earlier)      last day (4846 days later) » 

03:14
When I try to pass JSON_UNESCAPED_UNICODE into json_encode as the second param it says that it's an undefined constant. I was assuming it wouldn't need to be defined as on the example from PHP.net
Anyone know how to properly pass in that param? I tried passing it as a string as well.
Ah, never mind. I think it's my PHP version, it hasn't included those predef. constants yet. I will update.
 
2 hours later…
05:29
Anyone here?
@TimothyPerez Which PHP version are you using?
Let me find out
5.3.6-6
I'm about to update to 5.3.8
JSON_UNESCAPED_UNICODE is available with >= PHP 5.4.0
yeah, which is an Alpha build.
So I have to wait before I can use that.
I figured that out a while ago
Yes, you have to wait
05:42
@ShaktiSingh dude can you suggest me what is difference between primary vs foreign key
i have some confusion between these two keys
@TimothyPerez yeah dear
Ok, let's say you have two tables in your DB
TABLE 1: animals
@TimothyPerez pls continue
TABLE 2: food
05:44
@TimothyPerez ok continue..
In all of your db tables you probably want a primary key, so...
in table 1, you'd have a field called "animalId" which you would set as the primary key in table 1.
As you would do "foodId" in table 2.
Let's say that an animal entry looked like this.
@TimothyPerez ok pls continue..
Animal 1 - "animalId" => 1 | "name"=>"lion" | "favoriteFoodId"=>"2"
And in Table 2 let's just say you had two entries.
foodId => 1 | name => veggies
foodId => 2 | name => meat
So the lion, being a lion of course likes to eat meat.
That meat id... #2
is a foreign key on the animal table.
aka table1
Because it's referencing something from another table, hence the word foreign. Make sense?
?
@TimothyPerez means there is no nessary to declare any foreign key
It's not necessary, but it is smart to do that.
It goes along with the whole idea of MySQL being a relational DB.
05:50
hey quick question: I want to divide 2/5 in php and get a decimal answer, how do i do this
hmmm.
Let me think
$division = float(2 / 5)
ah ok
@TimothyPerez dude you are greate and thanks for your help
great
Thanks, btw, I made an error.
It's $division = ((float) 2 / 5);
"Call to undefined function float()"
05:53
Try the revision I put
It works, I just tried it. $division = ((float) 2 / 5);
echo $division;
just looked it up floatval()
Try to not use inline functions with variables too much. It's faster and better practice to just do a quick type-juggle like in the example I gave.
ok
thanks for your help timothy
06:10
If anyone needs help, I'll be gone for a little bit. Back around 2:45 EST
06:26
yes
Hi
anybody worked with wordpresS?
0
Q: Wordpress blog problem

Jimit I have developed whole my website in wordpress and my site url is like 'http://www.domain.com' and now I have one blog link with my website and I want to give url like 'http://www.domain.com/blog' how can I achieve this with wordpress? I have developed whole site in wordpress itself. Please hel...

please give me ans
06:47
I'm back
Yeah, I've worked with WP
Can you please give me ans?
Yeah, you need a mod-rewrite if your on Apache
Yes it is on
If you're on NGINX then you could do another re-write rule.
Ok
Could you msg me the URL?
I'll help you write a rewrite rule for it if you want.
But is my local server url
so, U can not see it
06:49
ok
Remote screen share?
Let me PM you
hmmm... on stack you can't pm
If you call me I can walk you through it.
407.504.7166
Thanks, but as of now I can't call u
:)
Oh, np
Let me think of a rewrite then.
What's the localhost url for your blog?
Is the sfl folder where you have your wordpress installation?
Yes right
06:52
And you have a separate blog section in your wordpress site correct?
Or is your entire wordpress considered your blog?
Yes, separate blog section
I have
Click on that blog section, do you get something like "?wp-content=5"
or something like that?
Actually, I am developing it I want to do something like this
I donno how can I achieve this?
Wht?
06:55
Ok, you are trying to create a WordPress site and you have no web dev experience?
Thanks for your time bbye
I was willing to help
But your questions are too generic.
I need more details.
Are you offended by what I said?
I have one blog section in my website and I want to keep its url something like domain.com/blog
how can I achieve this?
That site itself made in wordpresss
That's probably what you need
You need to create a permalink
That's another
Between those two links you can do what you need.
India man.
ok. thanks
07:03
Welcome
07:33
@Gordon Hey, sup.
& @edorian Sup, also.
@TimothyPerez ceiling
07:53
Anyone good with NGINX rewrites?
h
can i ask you about PHP and MYSQL?
i get data from database
then i loop in to table
for list data
then i put one button
name=save
07:56
Are you doing straight mysql_fetch_array or are you using an abstraction class like PDO?
mysql_fetch_array
ok
First, are you properly escaping & securing your queries?
for list data is working fine
i want to ask you about
when click save button
it save all lists data
to other tables
how to do that.
07:59
So you're doing a post from a form?
Correct?
i am using jquery
ok
Are you using $.ajax() $.post() or $.get()?
in jQuery
ok, first if you're sending data you need to use $.post or $.ajax
Don't use $.get
Can you do a quick post of your html & jquery code on pastebin.com and send me the link?
can show simple code when click save it save lists data to table?
PHP and MYSQL
08:02
Pastebin
pls
ok
this coding of list data
<table style="width:100%;border: 1px solid #ccc;padding-top:10px;" id="demoTable" cellspacing="0">
<thead>
<tr>
<th>
ID
</th>
<th>
Name
</th>
<th>
Address
</th>
</tr>
</thead>
<tbody>
<?php
while($row = $db->GetRow($stmt))
{
?>

<tr>
<td>
<?php echo $row["ID"] ?>
</td>
<td>
<?php echo $row["Name"] ?>
</td>
<td>
<?php echo $row["Address"] ?>
</td>
</tr>

<?php}?>

<input type="button" value="save" id="btnsave" name="btnsave">
Damnit
I won't help you if you can't listen to what I'm saying./
how to save those data to other table?
DOn't paste code on here.
Use pastebin or something equivelant.
for save
i haven't do it yet
08:04
.......
:(
because i dont know how to do?
save button
Do you have any ideas?
hey user872148... paste all your code on pastebin.com and send me the link, or I can't help you.
thank you
one sec
almost done
ok
done?
08:25
almost
hang on
cleaned up a few things, you're code needed help
morning guys , gals and everyone in between
done my?
mysql_* functions ? seriously ?! aitn't you guys a bit out of date ?
08:33
done
where i can see?
@user872148 I'm assuming you're not from the US
yes
i am from cambodia
ASIA
I see.
I hope I've helped.
when i click save not
working
no react
why?
08:50
ok
one sec
this not working
Did you add the other code I gave you?
data.name[i]= this.find('.name');
no add other code
all is ur code
this not working
data.name[i]= this.find('.name');
08:51
Do you have the post going to the proper php url?
Ok, let me take a look
one sec
Oh, there's a few errors
php where I have echo "<table id=
you have to change the quotes
to single quotes
i changed arelady
still errror
i test line by line
Don't worry, I'm testing code now
i saw error
data.name[i]= this.find('.name');
09:18
Got it
$('#btnsave').click(function(){
data = '';
var list = $('#myTable');
var i = 0;
list.find('tr').each(function(){
data += '&name-'+i+'='+$(this).find('.name').html();
data += '&age-'+i+'='+$(this).find('.age').html();
i++;
});
alert(data);
/*
$.post('yourPostPage.php', data, function(returnedData){
alert(returnedData);
});
*/
});
That should do it for you
@user872148 Are you still there?
09:35
@TimothyPerez How about here ?
:)
At first he was asking a PHP/MySQL question, then it went to jQuery.
I was just trying to help.
That is all cool mate, I was just saying :)
hi
sorry late
I responded to your post and posted it here too.
It works.
ok
and how to save it to databae?
database
Once you uncomment the stuff in $.post()
in your seperate PHP file you have to do a foreach() loop on your get var
howdy strangers :)
howdy
I'm sorry @user872148 I meant post vars
ok
how can those post vars to database
cus it has alot var
can tell some basic
10:08
you have to do conditional statements in your php foreach loop(s)
or you can re-tweak your jquery and do comma separated values then use the php split function
or JSON the result set
JSON is the shit
Can you swear on Stackoverflow?
Surelly you can try, at least :)
Alright, I'm out. Have a good day everyone.
Have a good day !
10:23
@salathe amen
10:47
@Gordon heh
11:29
which questions we have to prepare for a php developer interview
pls guide me
thanks
You must relax, in the first place. Nothing will prepare you better than that
kinda like jesus, relaxed and groovy
topics pls
ya pray for me to jesus pls
How are we supposed to know? You can be asked anything.
you may be faced interview na?
And don't say "oh, I just read about that today." Doest inspire confidence
11:33
so which topics has to be covered
Any and all are fair game. I usually will use you'd resume (CV) as a guide to make sure the skills you claim are real...
thanx
any more suggestions pls
Have oop on your resume? You better know what polymorphism is..
Asside from that, just try not to get flustered.
I don't know is not a valid answer... I don't know, but I would find out by doing x, y and z is a very good answer.
k sir thanx for your valuable time
bah. I hate it when I rightfully flag answers that contain a single meaningless sentence and then the OP adds in the real worthwhile answer later but before my flag was considered. Point in case stackoverflow.com/posts/7347235/revisions
11:38
what makes an interviewee that he will be useful
for us
thanks for all
have a goodday
all suggestions are welcome
11:51
@manoj i would suggest to require from candidates to submit a test exercise , preferable an implementation of login and registration
@tere
and then ask them a list of "why" questions about said code
@teresko thanks alot
such a task would illustrate the skills of people , and show how they treat things like SQL , what practices they adhere , how they structure the code , etc
besides
it is a common problem to solve in everyday applications , thus , there is no excuse "well, i have never done this before"
Hi all
I have a question regarding Dependency Injection
11:57
sure
Reading Fabian Potencier's talk about Containers at fabien.potencier.org/article/12/…
do not confuse "dependency injection" with "dependency injection containers"
but his example of a container uses Singleton itself -- and wouldn't this container be considered a God Object?
Right - got ya. Containers is what confuses me. I get the DI point.
right now DIC is a new concept in php , and the implementation are still flawed
It just confuses me, I fail to see how this would be better

« first day (327 days earlier)      last day (4846 days later) »