« first day (1035 days earlier)      last day (3898 days later) » 

12:02 AM
2
A: Can the for loop be eliminated from this piece of PHP code?

HamZaThere is a way to check if there is a missing number using an algorithm. It's explained here. Basically if we need to add numbers from 1 to 100. We don't need to calculate by summing them we just need to do the following: (100 * (100 + 1)) / 2. So how is this going to solve our issue ? We're goi...

 
user895378
@Ocramius Nothing is jumping out at me as obviously incorrect right now. If you can come up with any way to reproduce the issue or provide any more context let me know. In the meantime I'll work to get more test coverage with a focus on this area. Currently Artax has coverage on 1615 / 2099 testable LOC. Hopefully more testing will help uncover any potential problems.
 
@rdlowrey np, thank you for checking so far
I'll try to come up with something
 
@tereško Thanks again for this. Simplifies a lot.
 
and it removes the need for 20 tests, that basically do the same thing again and again, and again, and again
 
@HamZa noice.
 
Indeed. That does look interesting. @tereško
 
@tereško @LeviMorrison protip: use an assoc array as a provider, so you can more easily read, debug and filter the test cases.
 
12:29 AM
i already do
it's just stored a json for more conformable reading
 
1:48 AM
mornings!
 
'nite
 
@tereško Hmm, isn't that the guy who was arguing with ircmaxell about password storage? :)
@HamZa Well, you did ask me to do some rep whoring on that question ;-)
 
2:29 AM
Hi
 
@MichaelIrigoyen Any chance that you can give me a nice PHP & MySQL Tutorials. because i'm trying to learn that for a while and it seems complicated.
I've tried w3s tut but it didn't worked.
 
Yeah, you'll want to stay away from W3Schools. They are not a reputable source.
I know of a couple good books, but I don't know any good web tutorials off the top of my head.
 
@Yotam Search for tutorials covering PDO.
Any articles with mysql_ stuff in there should be skipped.
 
@MichaelIrigoyen Not in book thing, I don't do well without live examples
 
2:34 AM
Yes, mysql_ functions have been deprecated, you'll want to use PDO or mysqli_
 
@Jack what do you mean? is that a website?
 
Personally I find mysqli not much of an improvement except perhaps for the prepared statements and async queries.
@Yotam You do know how to Google right? "php pdo tutorial" [enter]
 
I agree, Jack, but sometimes working with old code, it's easier to do a complete function replacements than rewriting it all in PDO. Not optimal, but easier
 
@Jack Lol, ofc i do, but i thought it a book or something. I'll check that out.
 
Bah, I don't do old code :)
 
2:36 AM
You're a lucky, lucky man.
Haha
 
@Jack Lucky you
 
Just for the record, I know already PHP, I used XML database for now :) which it sux
 
@Yotam I recommend this book for learning the basics of PHP and MySQL: shop.oreilly.com/product/9780987153081.do
 
@cspray I was half kidding of course, though all but one project use PDO.
 
@MichaelIrigoyen As i said, I'm not a good learner without live examples/experiences..
 
2:38 AM
@Yotam I think you need to work on either a good imagination or having the book next to you while you try a few things on a PC :)
 
I understand that, but that's all I have to offer. There are lots of examples and sample projects to do in the book. All you need to do is work with a web server.
 
Is this: wiki.hashphp.org/PDO_Tutorial_for_MySQL_Developers what I need? is that secure enough for "high league" websites
 
If you're writing a "high league" website, you will need much more than just a tutorial lol.
 
Developing "high league" websites is not in the scope of a beginner. You learn to create these sites with experience, which you'll need to start small.
 
@Jack Thanks for the advice, but right now its more has an hobbie, I'll keep up learning with the years and become a legend :)
 
2:40 AM
With the years? Are you 16 or something? hehe
 
If you try to dive into big ticket projects, you're likely to leave security holes, unoptimized code that folds under a lot of traffic, etc. You really need to start with the basics to get a good foundation. :)
 
@MichaelIrigoyen Yes, I know but i didn't meant to begin with the highest, I meant when i be in the advance part I'll get the top secure that i need?
@Jack Suprise but 14 :)
 
The most secure website is arguably the one that always says "Hello world" :)
 
Security is an ever evolving beast. It's something you have to keep up with constantly. You'll never be 100% secure, even if you're a professional doing it for years.
 
@MichaelIrigoyen I know that, but I meant if i'm gonna get "hard" level of security from this tutorial link above i published?
 
2:45 AM
It'll be a good base for learning PDO, which has several security considerations built in to it. So, yes, good starting point for that. I just don't want you to be under the impression that learning how to properly use PDO makes your web application secure.
 
@Yotam The article looks okay to me.
 
@Jack one that doesn't use super globals? :D
 
Good enough to me, thanks guys
 
@DaveChen Only interned strings :)
 
where's DaveRandom? I want a elePHPant :D
 
2:49 AM
Security is an aspect, not an implementation detail :)
 
3:13 AM
@Jack the website on a server that's not connected to the internet wins (you won't get to see the site unless you're on the same local network, though)
 
@Jasper I disagree. I get access to your local network, find a vulnerability, get your data and then leave.
 
Noooo! Just because your web server is only available on an intranet IS NOT AN EXCUSE to skimp on security.
Disgruntled employees? Hackers? User error?
 
A server that only listens on 127.0.0.1 is a good start :)
 
@Jack I don't know the client on 127.0.0.1 can be a crafty bastard :)
 
@cspray but what about the keylogger I already had on your hello world server through means unrelated to the website. Since I shut down my network (I only mentioned the network to prevent only "unless" remarks) and now my keylogger is probably far more viable than your physical access
 
3:17 AM
@Orangepill I usually am :)
 
@Jasper :P
 
@Jasper Well, if you know the password, all security is moot then. :)
 
I always use the same password but make my username very hard to guess :)
 
@MichaelIrigoyen no, I meant: you run a server, connected to the internet, there's a number of possible vulnerabilities outside your website (which might already have let me install something malicious like a keylogger), so the unconnected server is more secure
 
3:20 AM
Oh, man. Don't even get me started on security through obscurity.
Ahh, I see what you're saying @Jasper.
 
Does anyone know of a simple open source project based off of silex... I need a 20,000 foot view of the framework in action.
 
At 6km away you won't see much of Silex I'm afraid :)
 
@jack okay 500 foot.... then...
or 150m if you prefer.
 
4:07 AM
Hi all
i have this code:                                                                       $combineDateandTime = array_map(function($rgItem)
{
   return array_merge(
      [$rgItem[0]." ".$rgItem[1]],
      array_slice($rgItem,2)
   );
}, $arrayLastResult);                                                                                          its work on my PC.but other PC get error :                                                                   Parse error: syntax error, unexpected '[', expecting ')' in line code -->[$rgItem[0]." ".$rgItem[1]],                                           
 
3 upvotes for wrong answer.
 
@Orangepill and @Jack..did you have any idea on my above issue?
 
@zira its because of php version.
 
Ohhh, that's odd ... why would json_encode() work for OP
 
Ohh??
 
4:22 AM
@Jack OP commented on both answer as it worked, don't know which worked.
 
Hmm, actually, it's not odd ... OP was already using json_encode() lol, he just wanted to only "send" a small portion.
 
His question misleads me by this get the specific item from json.
 
Yeah, I'm guessing that ->get() returns a "native" structure.
 
So which one is correct?
 
I think the other guy's answer :)
 
4:28 AM
ok, so i will delete my answer.
 
4:41 AM
@zira change [$rgItem[0]." ".$rgItem[1]] to array($rgItem[0]." ".$rgItem[1])
 
5:15 AM
@BadgerGirl I am serious I love you
3
 
posted on August 16, 2013

The PHP development team announces the immediate availability of PHP 5.4.18. About 30 bugs were fixed, including security issues CVE-2013-4113 and CVE-2013-4073. All users of PHP are encouraged to upgrade to this release. For source downloads of PHP 5.4.18 please visit our downloads page, Windows binaries can be found on windows.php.net/download/. The

 
1 message moved from JavaScript
 
6:13 AM
@hamza this is what happens when we treat new users badly.. This a programming question I promise
 
I am trying to draw an ER diagram for a social networking site Database and i am stuck at the posts . I hope this diagram makes sense .. lh5.googleusercontent.com/-M_FrS39mh3U/Ug3ENYpLBPI/AAAAAAAABUY/…
 
6:29 AM
Users can only create one page?
 
That one is for the roles , each page can has many roles , misplaced it ...
Not very good at it still learning
My question is how can i handle posts from users, pages,groups .
 
@Jack its me again :), I was reading the tut i found and I found out that i need to learn SQL Databases, there any recommended tut for that?
 
0
Q: connect to the remote MySql(VPS) from localhost

ఠ_ఠI need to build a web app and it should have a remote MySql databases .I know how would i connect it using Remote MySql allowing the current Ip in My PC.But that's not i want.I want to do it using SSH ( Using PHP Script )or any other good method ? I used bellow command but no luck with MYSQL conn...

 
Groups also easy , i can just have a column for the group the post is posted on but for pages i cannot come up with a logic that is easy and effective to use .
 
@PradyumnaSharma I would say you can introduce three tables: user_posts, page_posts, group_posts ... they all link to posts table.
 
6:36 AM
Then we may have duplicate post id's
 
@PradyumnaSharma What do you mean?
 
@Jack read my message above please
 
@Yotam I have.
I would say ... read a book on relational databases :)
 
Lol, again not a book fan
 
Well, there's no such thing as a live example for something that's mostly theory :)
 
6:40 AM
The primary key for each table would be a auto incrementing column and all the 3 tables will have the same PK which will create duplicates of the same id in 3 tables .
 
@PradyumnaSharma Wud? No. Each table will connect a page with a post; no auto increments there.
 
@Yotam Reading a book is much better and you learn a lot
 
In this case i guess there aren't but other there are, and as much that i know SQL book not comming without php and i need to learn both usess.
 
The best book about databases is one that doesn't discuss a particular brand of database or how it is accessed.
 
I had that argument few hours ago, can we please not go in it again?
 
6:42 AM
But there are good books on MySQL alone.
@Yotam It's a different argument.
 
I would like a good databases tables tutorial online, there any recommeded?
I've found webmaster, it not much either..
 
I don't know .. are there good dog walking tutorials online?
 
lol
 
How you should build a table is just a part of what you need to learn about relational databases.
You could look at articles discussing normalization.
 
I'll lookout for something.
brb
 
6:47 AM
side-by-side markdown has the red <s>strikethrough</s> flowing into the other part of the screen
 
Holy indentation.
0
A: When is necessary to use static methods?

Jack We did not declare function as static, we can still use className::staticFunction Not really. What you probably didn't notice is that PHP complains about the second type of invocation: PHP Strict Standards: Non-static method Foo::helloWorld() should not be called statically in php shell...

 
Congrats! :) I've found the looking! stackoverflow.com/questions/2583707/…
 
The joys of E_STRICT :)
 
Does any of you guys want advance XML system :P?
Since I'm learning MySQL i got no uses on the system.
 
SimpleXML works for me :)
 
6:56 AM
I'll upload link to media fire
It not finshed yet, but it good enough mediafire.com/?sn5b2hk4n9q23qj
 
Gooood morning
 
Good morning..
A small question: does $db = "newdb"; mean i need to add database name and extended (database.db or just database)
 
7:12 AM
Morning to all, i am facing a little problem in cookies, googled, but not fully succeded,
 
does your browser accept cookies?
 
Yes, i never deal with cookies before, i am trying to set cookies via localhost, i dont even know is there any file to be create where the cookies been set
 
are you using something like setcookie("mycookie", "hello world") in your code?
 
i used setcookie("email", $this->input->post('email_address'), 10, '/', false, true);
i dont know, where does it saves,
and i tried to get it like $this->input->cookie('email_address',TRUE)
 
7:17 AM
looks like this is within a class, note that if there is any output, setcookie won't work properly...
 
but nothing displays
 
Hi guys, I have a main page where I load another php page with XMLHTTPRequest, in the page I load there is a mysql query that creates a table, I have a refresh button that reloads this php page, now I want in my main page to show the number of elements in this table, I know I do a count in my mysql request but how to use this number on my main page?
 
please suggest me a method to do this,
 
is there any output from before you initialize this class?
 
no, but after when a user logged in, i set cookie, then i pass a welcome message string in another page
 
7:21 AM
so you don't see the cookie in the dev/firebug console?
 
Can anyone tell me the problem here? yotking789.byethost14.com/SQL-Login/register.php (I'm SQL Beginner)
 
@Yotam password is wrong, use "" or "password" or reset your database password
 
@Yotam a) google first b) we need more than this.
 
What do you mean? I used this: stackoverflow.com/questions/2583707/… following code and it fail
 
please clear my concept, is there any file to be create to save cookie, or browser handle it automatically?
 
7:23 AM
@Yotam so did you change $root_password="rootpass"; ?
 
@yotam you have to use your credentials to connect to the database
 
no
 
@IrfanAhmed do you see the cookie in your browser? (F12->Resources->Cookies)
 
@Mokkun I'm not sure what credentials are, I guess i didn't.
 
@Yotam change the authentication identification credentials to match your current setup
 
7:25 AM
Remind me again how i post code?
i show you what i used
 
@Yotam to connect to a mysql database you need to know the username and the password, otherwise everyone could connect to it and delete everything, you have to replace $root="root";
$root_password="rootpass"; by the credentials of YOUR mysql database
you copy paste and press CTRL + K
 
@Yotam paste, Ctrl-K. Try changing the variables to match your username/password :P
 
@Dave sir, there is'nt
 
<?php

$host = "localhost";

$root = "root";
$root_password = "rootpass";

$user = 'username';
$pass = 'password';
$db = "newdb";
if(isset($_POST['register'])){
    try {
        $dbh = new PDO("mysql:host=$host", $root, $root_password);

        $dbh->exec("CREATE DATABASE `$db`;
                CREATE USER '$user'@'localhost' IDENTIFIED BY '$pass';
                GRANT ALL ON `$db`.* TO '$user'@'localhost';
                FLUSH PRIVILEGES;")
        or die(print_r($dbh->errorInfo(), true));
here you go
 
@Yotam change
$root = "root";
$root_password = "rootpass";
 
7:26 AM
@IrfanAhmed try setcookie instead
 
to what? what root does?
 
@Yotam try a blank password or the literal string "password".
 
@Yotam but you have to know the root password of your database, where did you get that mysql database, it that a wamp server?
 
already using setcookie("email", $this->input->post('email_address'), 1000, '/', false, true);
 
Hi
 
7:27 AM
@Yotam What are you doing there? Install phpMyAdmin :)
 
yo
 
I'm using byethost14 website host
 
How can we check dependencies check in php class
 
Lol that is ready system, I'm trying to learn.
 
@gowri Using your IDE?
 
7:28 AM
while taking the object of class can we check the server has the curl enabled or not
 
@IrfanAhmed does $this->input->post('... properly return something?
 
@YogeshSuthar yes..get it. for lower php version need change [] to array ().thanks!
 
@Yotam I don't know how to works but when you created your mysql database they probably gave you a username, a password and a database name
 
@gowri Oh, you mean php version and extension dependencies?
 
@DaveChen worked the blank
 
7:28 AM
NO
 
@zira I always use [] :)
 
@Jack: what is the best way, means where in class
@Jack: yes you got it
 
@gowri php.ini for extensions :D
 
@gowri I believe there are tools that can help you figure out what your project's dependencies are.
I.e. it will go through the code and see what function calls are made.
Can't remember what it's called though.
 
@DaveChen I wish to add $_POST instead blank, how can i make it work?
 
7:30 AM
do you know any familiar .. oh
 
I mean, it fails when i add any kind of string in it.
 
@Yotam I don't understand what you're trying to do but it seems you don't even know the basics, why don't you take a look at a tutorial for beginers?
 
@Jack, what's your opinion on PHP magic? (magic constants, variables, methods, etc)
 
@DaveChen Avoid as much as possible :)
Are there magic constants?
 
Dave I'm thinking to add try..catch block in __construct to check that.
 
7:33 AM
@DaveChen Do you mean __DIR__, __FILE__, etc. ?
 
yes, I feel it's super dangerous
 
is it for me
 
mornings
 
@DaveChen I use some of those constants quite often.
 
@Mokkun True, i don't know the basics, but that how I'm learning. I'll look on the SELECT, and others shortly, i'm just trying to figure this code out.
And about what I'm trying to do, I'm trying to create database with username and password inside of it but I can't make that.
 
7:35 AM
@DaveChen Couldn't disagree more :-P
 
@DaveRandom totally want an elephpant :)
 
@tereško Hmm, bad answer to bad question?
Hmm okay, the question ain't that bad.
 
Can anyone help me on this one?
 
I have a folder filled with some classes (/class/loader.php, /class/myclass.class.php, etc). I have an ajax connector that contacts loader.php, however, this connector is outside of the folder. (/htdocs/connect.php). Currently, I just have loader.php require paths like "../class/*"...

Should I use __FILE__/__DIR__ ?
 
7:40 AM
@DaveChen So I see, the guy emailed me back yesterday but we have to get a carton (50) so I need to collect enough people who want them before I can shell out the ~E500 (I don't have a euro key :-() to get it. I am also informed that people have got this far before and then never actually managed to get him to email them back afterwards so... but I'm going to have a go, no harm in trying
 
-7
Q: R.E.S.T. : Why do people say ' R.I.P ' if 'death' is suppose to be 'permanent'?

gnome_panelR.I.P means Rest In Peace sort of like R.E.S.T. the programming language. when steve jobs died, people said REST.IN.PEACE ( RIP ) is that like an attempt to not let steve jobs find permanent heaven ? so his soul can stick around and thus burn in hell some more ? is that what R.I.P i...

 
@Mr.Alien Lol, I read that 2
 
@DaveChen The thing about using __DIR__ is that they are effectively absolute paths so there is no room for ambiguity. ../class/* relies on the cwd of the script, in a webserver env that usually safe but it's still not guaranteed. Using __DIR__ etc removes the possibility of you being screwed over by a badly configured server.
 
@DaveChen I would use dirname(__DIR__) to get the base path.
 
@Yotam :)
 
7:42 AM
is git being attacked again ...
 
morning all
 
sweet, just uneasy on if I should use magic or not, thanks :)
 
@AlmaDoMundo mornin
 
Somebody can help with that sql?
 
morning all ...
 
7:44 AM
@JoeWatkins hello
 
@DaveChen yes..but some people still using old version of php. =)
 
no worries, I use [] and functions that call private properties in array_map, this forces them to use php 5.4 :)
 
@zira Their systems are bad and they should feel bad
 
how do they do without yield ? :p
 
@JoeWatkins yo dawg, I heard you like Fridays so youtube.com/watch?v=kfVsfOSbJY0
 
7:50 AM
not again :p
 
Any more lip from you and I'll onebox it, don't think I won't do it
 
lip
 
lips even!
Oh what have I done?!
 
7:51 AM
Now you get to look at that beautiful smile
 
@DaveRandom could you stop throwing money at people who have no talent ?
I hope you realize that the video you are linking to has been monetized ages ago
 
I like to play russian music roulette
on fridays I will add Friday to my playlist and put it on shuffle
some times I'm lucky, sometimes I'm not
 
to get the vast majority of a species to agree on something is a kind of talent ... the subject matter, or opinion is not really that important, is it ??
 
I suppose so
 
she's tragic to look at ...
 
7:57 AM
Jesus I just checked her channel.. THERE ARE MORE VIDEOS!!
Why?!
 
@tereško Meh, more power to them I say. If people can get money for nothing then I just want them to do it for me. Anyway it's not like I'm giving her my money.
 
bbc.co.uk/news/business-23717575 headline: "flash for cash" ... not what I thought it was ...
 
0
Q: PDO MySQL create database

YotamI've learning MySQL (PDO), and I've found some code on this community. Now I've tried create database but I had no success since It showing me the following error: DB ERROR: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES) I'm not sure why he does tha...

 
@DaveRandom hmm well if you don't use ABP, then I guess you're kinda paying by watching YT/Google ADs
 
@dragon112 I used to do that to my sister when I was living at home. I paired her phone to my PC with bluetooth and set it to "don't prompt" and I would periodically put an S-Club 7 tune or something similar into her music collection, which she had on permanent shuffle
 
8:01 AM
Wow you are evil, I like it!
 
@DaveChen Yeh but they are literally never advertising anything I even remotely want, so I don't feel like I paid. If anything I feel like they're wasting their advertising budget on me.
 
Nono you've got that wrong @DaveRandom . Google knows what you like, even if you don't know it yet.
ALGORITHMS!!
 
rmoning
didn't think this was possible :D 3v4l.org/KbJS7
 
@Ocramius, hi
 
8:12 AM
@Ocramius That's pretty cool, instant object baby :D
 
@dragon112 useless ^ 2
 
I know, cool none the less
 
well.. this title is brilliant: stackoverflow.com/questions/18268812/…
 
@tereško hi
 
8:32 AM
stackoverflow.com/a/18267543/1592648 not sure if cleverly worded spam answer considering the employee is linking to their company's product, or just a regular 'not an answer'
 
Oh my god this earl grey tea is fantastic.
 
@Jimbo I prefer drinking Earl Gray =oP
 
@crypticツ No such thing :P
 
SELECT * FROM foo WHERE bar <> 3 <-- That doesn't return rows where bar is null. Is that SQL standard behaviour that I've never noticed before or is Jet being crap again?
@Jimbo Not even slightly.
 
@Jimbo I'm drinking "Winter Glow" tea right now....
 
8:37 AM
Tea + random crap != tea
 
I don't know why but that's the only Tea we have at the office right now
 
@DaveRandom Oh come on, it's bloody good tea - and there's a Lemon Grey tea as well! Haven't tried this yet
 
I'ts not even bad :o
 
@Jimbo It's ruining perfectly good tea leaves by adding some shite to them, I'm not on board. English Breakfast any day of the week
preferably Twinings
I don't put up with no supermarket own brand nonsense either
Except maybe Sainsburys, since they started out as a tea merchant
 
@DaveRandom Okay, we can agree that Twinings is a good brand. Yorkshire Tea's good if you want a good strong brew
 
8:39 AM
^ Tea Hipster
 
Seriously though guys, chat.stackoverflow.com/transcript/message/11276031#11276031 - am I shit or are M$ shit?
 
I've never witnessed such brew snobbery ...
 
@JoeWatkins I'm starting to doubt your commitment to being an Englishman
 
SELECT * FROM foo WHERE bar IS NULL OR bar <> 3 :D
 
@DaveRandom Well NULL <> 3 so it should return the row right?
 
8:41 AM
@Jimbo Well yes that's the work around but it looks weird
 
Fixed
 
Lol xD
BEST. FIX. EVER.
 
lol
 
@DaveRandom and I yours to being a man ... twinings, rly ??
 
Sorry, it's Friday, and this tea is absolutely brilliant.
 
8:42 AM
@dragon112 Well that's what I think but SQL does handle NULL as a special case, which is why you have to do IS NULL and not = NULL
 
@DaveRandom Yea.. I suppose, still 3 != NULL SQL or not
 
But still, there's no way around that fact that 3 <> NULL
 
So it's just sql being shitty or M$ being shitty
 
8:44 AM
Friday Problem solved: userscripts.org/scripts/show/83584
 
@JoeWatkins Yeh I looked at that but that's not what I'm doing, I'm comparing with an actual value so I would expect that when the NULL is in the variable side of the expression it would be considered to be not a match with the static side and follow the regular behaviour of a row with a value :-S
The way it's working at the moment is as if 3 = NULL
Also it's Jet and not SQL server so it doesn't necessarily apply, Jet is like an even more retarded version of T-SQL
 
Yes and that's not right.
 
Huh, MySQL does it as well. Evidently I've just never noticed before.
 
NULL <> NULL will give you false
NULL = NULL will give you false
 
Ah right
 
8:50 AM
Well I know that, but I'm not doing that, I'm doing NULL <> 3
 
NULL is not a value. It is the absence of one
 
doesn't it give you NULL ?
 
@tereško Still 3 is a value, NULL isn't a value thus NULL <> 3
 
NULL <> 3 evaluates to NULL
 
That's just stupid. How can a boolean expression evaluate to NULL? @SQL Y U NO MAEK SENSE?????
Obviously it is a standard way of operating though, I'll just have to chalk that one up to experience.
 
8:54 AM
NULL = no value. so it can not be compared as well
 
13 mins ago, by Jimbo
SELECT * FROM foo WHERE bar IS NULL OR bar <> 3 :D
 
Well yes, but don't you think that looks just a little redundant?
 
Switch it! Switch it! - High on tea
 
I agree, you have to switch it
 
so, do you thing that this will work ? SELECT * FROM foo WHERE bar = NULL;
 
8:55 AM
We know it won't
 
if not, then why the fuk you expect your previous query to work ?
 
No, because NULL isn't equal to anything. And that's exactly the point. If it's not equal to anything and I specified that I want rows where a column is not equal to a specific value, rows with no value should match that query.
 
SELECT * FROM foo WHERE bar <> 3; could be expanded as SELECT * FROM foo WHERE bar IS NULL OR bar <> 3 OR bar = 0
 
If I got a string that is "Name, Name, Name, Name," whats the best way to explode just use explode or str_split?
 
you are being a bitch because you expect to expand it as SELECT * FROM foo WHERE bar IS NULL OR bar <> 3 OR bar = NULL
which does not work
 
8:58 AM
@Tredged explode(',', $string) or other way round, can't remember
 
Department of Redundancy Department
 
just learn SQL
 
lol!
 
:-P
 
@Jimbo Why is the output Array then?
 
8:59 AM
no, i mean it seriously
 
@Tredged Because, you exploded it... " whats the best way to explode"
 
there are 3 thing that php do not learn and expect just magically to know: javascript, regexp and sql
 

« first day (1035 days earlier)      last day (3898 days later) »