« first day (990 days earlier)      last day (3958 days later) » 

11:00 AM
Hi all do any body can let me know best practice of connecting multiple db using php ? As like active records style ?
 
I need an opinion license for: sublime text 3 or phpstorm? @Mr.Alien @dragon112 @HamZa @tereško
 
well .. i already told my choice
@SanjayDey there are very few cases when use of active record falls in the vicinity of "best practices"
 
yes can you provide me some examples architechture as Popular frameworks follows in PHP ? @teresko
 
wat ?!
 
Yes I did created multiple database connection library with PDO but I need some best architecture for DB layers as like yii or symphony or zend follows ?
 
11:05 AM
what do you mean with "some best achitecture"
 
Hes obviously using google translate.
He wants you to show him, how to use multiple DB connections using PHP.
 
are you implying that just because Yii does something, it would automatically become "best architecture" !?!?
i would actually say that it is the exact opposite
 
@Tredged I don't want anybody to show me how to connect with multiple db
 
Quote "Hi all do any body can let me know best practice of connecting multiple db using php ? As like active records style ?"
 
There are PHP forums in India. Right? Places where you do not need to use GoogleTranslate just to ask a question.
 
11:07 AM
"yes can you provide me some examples architechture"
Never mind can't be asked to discuss now.
 
I once worked on a project which used symfony inside a typo3 system it was rather messy used 2 databases thou.
 
@cptnk I love your location, Disneyland Resort, CA. You think I can come visit?
 
@Tredged im not really living there
 
Oh, you dissapoint me :(
 
The architecture that you use for dealing with multiple DBs highly dependent on how the rest of your code is structured.
 
11:09 AM
@Tredged but that definetly is a place I´d love to visit :(
@Tredged im sorry :(
 
Yes I did created an small MVC framework but not sure how much it it optimised and how to provide a best db layer as popular frameworks does - If any body would like can fork my git repo and check what i have done and let me know feedbacks. I f you would like I can provide my repo url....
 
:(
 
@SanjayDey those projects are open source you can just download them and look into the code.
 
I think he didnt succeed himself. would love to help but i have no idea how that works.. :(
Never looked into it.
 
@Tredged is the deterioration of english somehow spreading ?
 
11:12 AM
Yes i know those are open source but i have created and open source framework. Just need suggestion and contributions if anybody like to do ...... It will be highly really appriciable
 
Ye it is xd
 
Sorry not understand @tredged
 
wat
 
Sometimes english just doesnt like me.
 
Sorry, boss was here so I logged out
 
11:14 AM
Oh thank god I dont have that issue anymore ;x
 
Would you like to look at the code which i have done and if anybody interested they can perticipate in that framework development ....
 
I dont think anybody would want to participate* in the framework development.
 
heh
 
Is that lady gaga here in the pic? stackoverflow.com/questions/17424049/…
 
Hahahaha lol
I solved a different question from him earlier.
 
11:16 AM
-2
A: How do I make a button appear after inputting text in an HTML form?

Yogesh SutharYou have to use round bracket () to sum the values. if($answer == $firstnumber + $secondnumber) should be if($answer == ($firstnumber + $secondnumber)) Codepad

sheep downvoting sigh
 
well im out I actually have to do some work rather then just chatting and listening to music :(
 
@cptnk Haha, goodluck!
Your 0 again @YogeshSuthar
 
thy
 
@YogeshSuthar to the rescue ;)
@Tredged I made him +1 now
 
Ye same ;0
When he was -2 xd
 
11:18 AM
@Tredged @Mr.Alien Thanks. I hate bloody sheep downvoting.
 
@YogeshSuthar Actually parenthesis are not req
 
@Mr.Alien () is required.
again back to -1. lolzzz
 
@YogeshSuthar nope it's not :p
 
2 messages moved to bin
 
@Mr.Alien see demo of my and alex, you see the difference.
 
11:23 AM
@YogeshSuthar Your example doesn't use parenthesis either
 
Yes may be someone who has good knowledge and would like to help others they do surely ..... I just like some feedback of my code and tips how to improve more.... @Tredged
 
I really hope you find that person but unfortunately I cant help you with that. @SanjayDey
 
@Mr.Alien ohhh. How can I forgot that. silly big mistake. ;)
 
@YogeshSuthar :)
 
now deleted
 
11:26 AM
lagtaa hai tu mereko php bhula dega
 
Why don't you have much knowledge in Object oriented programming or in Database @Tredged
 
:D SQL query change karte karte () daalne ki aadat ho gayi he. @Mr.Alien
 
Thats not the point at all ;x
 
@YogeshSuthar ROFL
 
0
Q: Ajax not working in chrome. Can anyone save me?

Jay P. SonarI have this code on my page... the jQuery window.setInterval( function(){ $.get("php/get_posts.php", function(data) { $('.post-container').prepend(data); });},10); The this is the get_posts.php <?php include('dbconnect.php'); session_start(); $uid= $_SESSION['u...

save this person lolzzzz
 
11:30 AM
Hahaha
 
@Tredged Why do laugh ? Any idea ?
 
lol
 
Ha ha aha aha h
 
You here to seek help or to test my capabilities?
 
@SanjayDey , you seriously need to learn English, otherwise you won't be able to get any help with your project outside of India
 
11:32 AM
Why everyone's laughing here for no good reason? and I am also seeing some shitty questions thrown here
 
and definitely change that attitude.
 
yes thats what I was waiting for @tereško
 
people expect to much from people here, like lets post a question everything will be done for us anyway.
bleh
 
@Tredged which part seems "too much" for you ?
 
Oh ..... Thanks @teresko... I appreciate your response. I am still in learning curve... If you people give me some right direction it will be really helpful.....
 
11:35 AM
@SanjayDey you could start watching lectures that are listed here: stackoverflow.com/a/16356866/727208
but they are all in English , so i do not know , how much use the will be for you
 
@SanjayDey Listen to English songs...
 
Sometimes people expect you to post a solved code, I think learning is improving thats why pointing in the right direction is beter?
 
@Mr.Alien , i have found audiobooks to be much better, if you already have some working knowledge in english
 
Why @teresko do you think my english is that much poor ... Don't you understand what i mean ? hope you do, and that is why you did reply back ........
 
@tereško Yea, but sometimes reading articles in English news paper, some magazines and few songs will help him a lot
 
11:37 AM
if you are a developer, you should be reading articles in english all the time
that is not the issue
 
@tereško I guess he is a bot -> @SanjayDey .... On purpose
 
@tereško do you have some? :D
 
all stolen
@Ocramius , what genre you would prefer ?
 
ah, from the cloud :S
@tereško DDD-oriented
 
Can anyone help me about this link pls
-2
Q: Display record in customize view

WolverineI have two tables named style: =================== id | style =================== 1 | x =================== 2 | y size : =========================================== id | size_name | style_id | Quantity =========================================== 1 | 2T ...

 
11:39 AM
@Ocramius that's not a literary genre that i am familiar with
 
@tereško np, I'll find some in the cloud :)
 
ok guys have a look - tinyurl.com/n89khle I like peoples those who help others.. and i do share if i have any idea or knowledge.. I expect same from others .......
 
http://stackoverflow.com/questions/17424052/sql-query-always-fails/17424368?noredirect=1#comment25307107_17424368
 
@tereško thx
 
registration on that site is free , but required for accessing torrents
@SanjayDey what is the point of that "article" ?
 
11:43 AM
http://stackoverflow.com/questions/17378525/display-record-in-customize-view

pls help me in this link
 
Mobile doesnt support pings I guess, nyways @teresko.,. Some dont read articles, like we do, but yes, thy will read which celeb is doin what
 
LOL @Mr.Alien
 
Lots of code
 
@Mr.Alien well ... every morning and evening i read stuff on reddit's php/javascript pages and on hacker news
 
11:48 AM
same for me ;x
 
Anyone here made a webshop?
 
I made one a long time ago :P
 
Did u wrote it in plain php or used a framework?
 
Plain php
 
Was it a big webshop and did it took a long time to develop it?
I want to create a webshop but Im not sure about the time period i will spent on it.
 
11:51 AM
Depends how fast you work and how much you know, mine didnt take so long cause it was small.
 
Is it possible to visit it?
 
Ha, no it doesnt exist anymore lol it was a long time ago.
 
Oh ok. :-)
 
What type of webshop you want to develope
?
 
I have to make one for rental products without a payment system
people have to indicate for how long
they want to rent a product, and I have to indicate related products etc
 
11:56 AM
Oh sounds nice ;)
 
@tereško I don't follow any particular blogs, though I read envato stuff much.. the tuts websites, do share few articles which you think are interesting to read ;)
 
Hi, where I'm wrong with this regex? regex101.com/r/dI5rX9
 
@acasanovas why do you think there is something wrong with it?
@acasanovas we have now idea what task you're solving and cannot read your minds
 
@zerkms haha, well, because it doesn't work on my php, and because on the regex don't recognise &nbsp;
 
12:02 PM
@acasanovas "doesn't work" isn't an explanation either
does it output "I don't work" on the screen or what?
 
@zerkms I exactly get: "Warning: preg_replace() [function.preg-replace]: Unknown modifier '\' in blabla"
 
@acasanovas and now we need to guess what exact code you have?
 
@zerkms omg, I forgetted the #
@zerkms the exact code it's : preg_replace('#(Coût\s+de\s+la\s+prestation+&nbsp;)\s*:+&nbsp;+\s*\d+(\.\d+)?#u'‌​, '$1:', $body);
@zerkms now I don't get any output error, but it doesn't erase the price
 
@Mr.Alien emm ... that tuts site is actually notorious regarding the quality of content that gets published there. It is not as bad as phpclasses.org, but close
 
@acasanovas the regex is terrible. Explain what you need by words
 
12:06 PM
@zerkms I need to clear the price of this:
<p>
Coût de la prestation&nbsp;:&nbsp;97.56 €.
</p>
 
Assuming the input string is "Coût de la prestation&nbsp;:&nbsp;97.56 €. "
what output do you expect?
 
@zerkms the output that I expected was
<p>

</p> or
<p>
Coût de la prestation&nbsp;:€.
</p>
 
preg_replace('~[\d.]+~', '', $str)
?
 
@zerkms well, without the html tags
just delete the entire line or the price
 
what does that mean?
you said you only need to remove the number
ask the question again then. Your original was to remove the number. Now it looks like that's not what you want
 
PLB
12:10 PM
@zerkms That will remove every dot and digit from input.
 
\d+(\.\d+)?
?
 
@zerkms dosen't matter if I delete just the price or the entire line, but I cant do "preg_replace('~[\d.]+~', '', $str)" because there is more html code on the string
 
PLB
@zerkms Why do you group \.\d+?
 
@PLB decimal part
 
12:12 PM
@PLB to make the whole "dot and digit characters" optional
 
@HamZa it rulez!
 
(Coût\s+de\s+la\s+prestation)(?:\s|&nbsp;)*:+(?:\s|&nbsp;)*\d+(\.\d+)? --- that's really ugly )
 
@zerkms thanks :D
 
PLB
@zerkms For prices they are almost never optional (from my personal experience).
 
@zerkms thank you too!
 
PLB
thanks.
 
@zerkms that's quite an expensive dish tray
 
@HamZa with that: preg_replace('#(Coût\s+de\s+la\s+prestation)(?:\s|&nbsp;)*:+(?:\s|&nbsp;)*\d+(\.\d+)?#u', '$1:', $body);
i get: Warning: preg_replace() [function.preg-replace]: Unknown modifier
why?
 
@acasanovas re-create it by parts if you don't see the issue
that's what called "debug" and that's what we do every day as our normal job
so take the first parentheses - do they work?
if they do - continue with next piece
continue until it breaks
 
@acasanovas It does not throw any errors, are you sure you're testing on the right code ?
 
12:18 PM
@acasanovas Are you sure the character encoding of your PHP script is UTF-8?
 
@DaveRandom that's what I thought originally, but even if it's not - it shouldn't fail that way
since UTF-8 character codes and ascii safe characters don't interfere
 
@HamZa of course, you are right.
@DaveRandom I have the encoding on utf-8 ;)
@zerkms haha, i know what't debug.
 
@acasanovas then do it! :-)
stackoverflow.com/q/17424885/251311 - the most effective way to anger your users
 
Well "unknown modifier" implies it doesn't recognise /u, which means that either the regex is interpreted as having trailing data after it and part of that data isn't a valid modifier
...or possibly the string has ended up with a zero-width character at the end of it somehow /cc @acasanovas
 
12:23 PM
Anyone heard of x-cart.com ?
 
@DaveRandom I see. I'll consider it the next time ;)
 
@zerkms Nah, I have a much better way: randomly invalidate session tokens with no regard to the last time they were used
 
@DaveRandom it's too artificial
while "1 session per user" is a quite common thing
and in most cases developers cannot even explain why they need that )
 
@zerkms Not at all. I worked on a site a while ago that had a cron job that was supposed to "clean up" session tokens once every 15 minutes, but it basically just destroyed all existing sessions
 
@DaveRandom I don't believe you
 
12:25 PM
Srsly
 
lol
 
(It wasn't supposed to do that, obviously, but the guy who wrote it had f*cked off and no-one knew how to fix it, took me about 10 mins :-P)
 
gc.russian_roulette_mode On
 
gc.do_you_feel_lucky_punk
 
@DaveRandom were you simultaneously flexing as you wrote that last bit?
 
12:31 PM
@CarrieKendall Constantly. I rarely wear shirts, I got fed up of bursting through them Incredible Hulk-style
I wonder if there's anything else I've said in here that's further from the truth. That one would take some beating...
 
@DaveRandom that goes without saying :P
 
@DaveRandom it's not only shirts the Hulk burst through!
 
@salathe Indeed. Yet somehow his underwear always survived. I really must find out where he got them from...
 
@DaveRandom you could argue about @rdlowrey's horrible case of vitiligo :]
 
I had to Google that
 
12:35 PM
@tereško I prefer tuts as it holds mix technologies, kinda 1 stop shop, yes, some are pretty bad, but again, it depends...
some are way more informative..
 
Thanks to tuts, I've grown in confidence a lot
 
jaja
 
@CarrieKendall lol
 
12:48 PM
@HamZa If I want to do file.php?option=1 or something similar... how have I to define the option and the different things? is it some kind of POST or what?
 
@acasanovas GET
 
Morning
 
@ircmaxell hello
 
@HamZa humm GET, thank you!
 
@ircmaxell any new (undocumented) feelings on glass?
 
12:50 PM
welcome
 
@CarrieKendall Sometimes community makes weird decisions ...
 
@HamZa it apparently auto declined because OP overwrote my edit..
 
@CarrieKendall ah that makes sense
 
@CarrieKendall it's interesting
not 100% sold, but not disliking it either...
especially with the addition of the browser... changes things
 
12:57 PM
hi
 
@ircmaxell interesting, do you ever have eye strain?
 
Hello
 
hi have a good day
 
Hi Mathi
Is there anyway to know what's the method of encryption used for this string
tfdIB3AlviYKVYguaT1S8g
?
 
@CarrieKendall nope
 
12:59 PM
do you know about the audio conversion using ffmpeg?
 
@ircmaxell that's cool, i am requesting another blog on this matter :]
 
@djtechie Check this out code.google.com/p/hash-identifier
 
will likely do
 
can't wait ^^
 
Anonymous
@HamZa Just had my first ever interview as web developer
 
1:01 PM
ok
 
@phpNoOBఠ_ఠ nice, how did it go ?
 
Anonymous
@HamZa Not so good. Because, I am a noob remember
 
@phpNoOBఠ_ఠ For what did you apply ? PHP developer ?
 
Anonymous
@HamZa Yup.
 
hi everybody
is there php librairy to read Excel file and transform it to un object !!
 
1:05 PM
hi anybody know about ffmpeg audio conversion?
 
@phpNoOBఠ_ఠ Well, can't be helped. It's your level, but you can work on it. I've also ordered some books to hone my skills and extend my knowledge
 
Hi Hamza...
 
@Mathi read the docs, you'll know all the in and outs
@Mathi yellow
 
ok.
 
@CarrieKendall it likely won't be this week
 
1:09 PM
@ircmaxell unacceptabruuuu!
 
Hamza, i asked about ffmpeg audio conversion but the docs having details about the excel.
 
@Mathi that was for phenix_dz
 
ok.
 
Hi @HamZa thank you for your feedback , but do you had experiance before with this Lib ?
 
1:17 PM
@Phenix_dz nope
 
@HamZa ok
 
@Phenix_dz do you work for a company ?
 
Hamza, I am using AWS server with PHP 5.4.15 here exec(), shell_exec(), system() and passthru() all are not working i don't know whats the problem?
 
@Mathi Maybe they are disabled, or PHP doesn't have the privilege to do so ...
 
Hello any zce here? i just passed exam but i've got a question and can't reach to zend with phone.
 
1:22 PM
@Hamza yes
 
in php 5.4 the safe_mode has removed instead of php 5.3 but it's not working
 
@Phenix_dz is the pay good ?
 
Hellozzz
 
Salary can be a very personal question
Hello treged
 
Wazzzaa
 
1:27 PM
hhh @HamZa nice question ........ good for moment
 
@Fabien I didn't ask how much, it's less sensible...
 
hello, I'm newbie at php and I would like to know if it's possible to use global variables between different php files using $_SESSION['whatever'] once you have started the session. ps: I'm not using forms...Thanxs
 
LOL
^
 
@Fabien not for us ;)
 
1:28 PM
Aye. I personally don't mind it, but some people do. I find more an American thing than UK. (personally).
QuinDa, what are you trying to achieve?
 
@QuinDa you guessed right, use sessions
 
I'm 18 and a student I earn €436,- a week 40hours a week.
 
Ok, Im going to try to explain
 
@Tredged are you serious o_O ?
 
Yes lol
 
1:30 PM
before or after tax?
 
but that is relative for each one , and each country ........... so a best thing that we enjoy with this job ................lol
 
before , and after tax around €395 something.
Barely tax since I am a student and alot of rules apply :)
 
I agree with @Phenix_dz. I took a £7k pay cut to try and get more out of my job.
 
my salary is good for my age since I still live at home and get anything I want xd
Its just I do what I like to do and get paid and relax also xd
 
@Fabien I have a index.php where there I have 3 div and I show or hide them depending on the buttom you click. After I have page1.php and page2.php... I would like index.php to show or hide differents divs depending on the page.php where I come from...I don't know if I've explained my self right
 
1:33 PM
@Tredged a best is a happines .......................only
 
I am happy
xd
If your live is allright everything is settled then ofcourse u are happy
 
QiunDa. use $_SESSION
 
otherwise ur depressed I guess oo
 
as long as session_start(); is at the top of all your php files you should be fine.
 
i would use cookies for this
 
1:35 PM
@QuinDa You wouldnt need different pages to do that, just use javascript ;x
 
@QuinDa for clarity I recommend adding something like

echo "<pre>";
print_r($_SESSION);
echo "</pre>";

while you're sorting it all out.
 
@Tredged what do you mean
 
As @draconis said, you can use setcookie(); too, but bare in mind a cookie won't be usable until page refresh.
Best to use both though
 
hi
 
i misunderstood nevermind @QuinDa
Hi eugene
 
1:37 PM
Ok, I'm going to try with session
 
Guys is there some convention for naming and structuring modules/submodules?
 
Thanxs guys
 
@QuinDa just the print_r() of $_SESSION to make your life easier.
 
Just use session if it bothers u switch, or if ur finished switch. its a personal choice not everyone likes cookies.
 
o.o if someone pings you and then edit his post, you will be re-pinged
just happened when @Fabien edited his message lol
 
1:39 PM
Whats beter for a notification push to all online users websockets or ajax?
 
heh sorry. I php.netted setcookie() damn undscores :)
 
I have support for few route patterns in my app, but I'm interested in routes for submodules. Obviously the can't be unlimited, since urls have limited length as far as I know.
 
@Tredged so you dropped your studies ?
 
Nee 1,5jaar stage :)
 
3 hours ago, by Tredged
I need an opinion license for: sublime text 3 or phpstorm? @Mr.Alien @dragon112 @HamZa @tereško
^ Sublime text is an advanced text editor, while phpstorm is an IDE. So you're comparing 2 different categories...
 
1:43 PM
Gosh I normally use notepad
Ill stick with storm since thats going great ;)
 
@HamZa sublim text is so light for profissionel personnes
 
@Phenix_dz editors are lighter than IDE's
 
@Tredged Just yesterday I saw a new IDE: kineticwing.com
2
It's free. I have absolutely no idea if it's good at all.
Worth a shot.
 
@HamZa of course
 
@LeviMorrison Bookmarked it going to check it out ASAP. Thanks!
 
1:46 PM
@Tredged heh, why do you guys find interesting internships lol ?
But what do you do there ? Do you really do some stuff with PHP or just making templates ?
 
No, currently coding a online system what manages all income of projects (GAS&ELEKTRA) and starting of tomorrow a new system that automatic controls the income of products in the warehouse in out and statistics.
 
@Tredged What language do you use ?
 
The first to manage products is rather large then you would expect
They want a PHP/jQuery based manager so yea
 
I'm a big fan of PhpStorm, though. Netbeans is decent but has always been so sluggish and a huge memory hog on my systems.
 
@Tredged Are you at ROC ?
 
1:50 PM
That and an annoying refactoring bug in Netbeans nobody seems to be able to reproduce on demand but happens a couple times per day.
 
Ye ROC
 
Something is going wrong. This is my code:
index.php : <?php if(!isset($_SESSION['come_from'])) {
session_start();
$_SESSION['come_from'] = 1; } ?>
pag1.php: <?php if(!isset($_SESSION['come_from'])) {
session_start();
$_SESSION['come_from'] = 2; } ?>
is that code right?
 
@QuinDa define "right"
 
@Tredged how in the world are you doing 1.5 years internship ?
 
Bleh let me explain in dutch
 
1:52 PM
@LeviMorrison looks interesting, thanks for sharing
 
@cspray should work
 
1.5 anderhalf jaar Media- applicatieontwikkeling heb ook een afspraak onderling met school en werk ;)
 
@QuinDa, session_start(); is at the top of all your pages, the very top. No matter what. If it's a page requiring $_SESSION data that is
 
Dat is hier gewoon mogelijk hoor?
@QuinDa No not really lol
brb
 
@Tredged heh, I'm trying to do it in 1 year instead of 2 :p
 
1:54 PM
@Fabien not at the very top actually
 
well before any output
typically the top
 
Officialy mine is 3 years I made it 1,5years with only my internship
and ofcourse the exams after that but thats because everything they 'teach' is known for me lol
 
@QuinDa I'm trying to visualize what you're trying to achieve to help.

Could you explain again please? As a user using the site.
 
@Fabien I am also still figuring out what he wants, he wants to make a code that reads from what page u are coming and then only show that <div> or something?
 
Hi can some one help me echo only 5 lines?
 
1:56 PM
it seems we are in the same boat :)
Are you intending to go to the HBO ?
 
@RahulKhosla
for($i = 0 $i < 4; $i++) {
echo $i."<br />";
}
 
I have a file that has 10 lines, i want to echo only the first 5.
 
Ye, I mean you know here its hard finding anything with MBO because althou you would have experience they would still ask diplomas and certificates
 
@Tredged When are you attending it ? This september ?
 
OK, I have a index.php where I have 3 divs that I show or hide depending on the button I click.....after I have page1.php and page2.php....for sure I will come back to index.php....so I would like to know where I come from to hide or show divs depending on the page you come from
 
1:58 PM
I see
 
@Fabien thanks but how do I do it so its for a file eg get file contents from example.com/this.php ??
then on home echo this.php but only 5 lines?
 
@HamZa No, I could've this year but I stopped one year (last year) to work also at a private company so kinda screwed that up but yeah.
 
aaargh, we could have ended up in the same class :p
I'm doing internship now, if all goes well. I may attend it in september
 
@QuinDa $_SERVER['HTTP_REFERER'] contains the referring page maybe that will help.
 

« first day (990 days earlier)      last day (3958 days later) »