« first day (1801 days earlier)      last day (3150 days later) » 

1:19 AM
This alone is reason enough to ignore the site, anyone who thinks parser ambiguity is worth saving a single fucking keystroke is a moron... phpsadness.com/sad/46
 
@ircmaxell Point is though that it is inconsistent with:
Bobs-iMac:~ bob$ php
<?php var_dump(1) ?>
int(1)
 
Which is idiotic and should be fixed
 
@ircmaxell actually, main reason probably is <?=$var?> (and short tags in general)
 
Can you put a statement in a short tag?
 
<?=$var;?> in a template would look quite stupid.
 
1:22 AM
No, it must be an expression
 
Bobs-iMac:~ bob$ php
<?=1; var_dump(1) ?>
1int(1)
 
Hence it is a different construct, and should behave differently
 
it's just about the implicit T_ECHO created here
but after the semicolon can be everything.
 
@bwoebi not sure if you are missing my point, or just ignoring it.
 
@ircmaxell that was replying to "no it must be an expression"
I just mean, while it's a slightly different construct, one might see it as inconsistent.
 
1:24 AM
@bwoebi the bug is that it is not just an expression
 
Though, I agree with you that a lot of these "sadnesses" are none.
@ircmaxell right, but lexer isn't that clever ;-)
 
@bwoebi it shouldn't have anything to do with the lexer...
 
@ircmaxell but it's the lexer who emits the trailing semicolon and detects PHP vs. text mode
 
@bwoebi shouldn't
 
ah that's your emphasis. ok.
 
1:26 AM
Having the order emit the trailing semicolon is idiotic
Arg, auto complete...
Having the lexer....
 
well, how would you then emit it in lexer/detect it in parser? add an extra token with is in parser alternated to the semicolon?
 
You don't . you have a token for the closing of the context ?>
 
@ircmaxell you basically mean you'd have a special token for <?= and ?> … Yeah, that'd be the clean solution.
 
Yes
 
But disallowing <?echo $var?> (without semicolon) probably will break a lot of things too…
We could deprecate it, but outright removing it might be too drastic.
 
1:33 AM
It should break things
That is bad for several reasons
 
What's bad? That it breaks things?
 
Not withstanding <?echo is a XML preprocessor declaration
Not to mention that it causes weird parsing oddities.
 
@ircmaxell which PHP interprets (with short_open_tags=1)
 
@bwoebi yes, which is beyond stupid
 
Which is why it's recommended to have these off…
 
1:36 AM
I don't mind passing <? By itself (don't like it, but whatever), but parsing <?JavaScript is just dumb
 
@ircmaxell It's part of the legacy… and we need to decide if we can eliminate that ini setting…
@ircmaxell A lot of code doesn't put a space there...
 
@bwoebi yes, which is wrong
 
@ircmaxell Well, at the day when we disallow that, we honestly just should kill the whole ini option.
 
@bwoebi not disagreeing, but we should kill them for different reasons...
 
@ircmaxell parsing and language behavior controlled by ini options is bad… right.
Wuh… that stupid ini setting exists since PHP 3 times.
 
1:49 AM
@bwoebi yes
 
And what exactly do you mean with message brokers? an event system?
 
good morning
 
@bwoebi "event system"?
 
@ircmaxell well, you send an identifier a long with data to an event handler which then forwards that data according to the identifier?
 
@bwoebi as a first order approximation, yes. But there is a ton of more important components to what it does
 
1:53 AM
@ircmaxell hence I'm asking what exactly you mean
 
It's not just a single router. It fully decouples so that you can forward data to multiple receivers iof that's what you need, based on all sorts of rules
 
@ircmaxell so, basically pub/sub, what's often solved via e.g. redis?
 
Again, only as a first-order approximation
 
sigh. Then, what do you mean?
 
A lot more goes into it
 
1:58 AM
yeah… explain? What's that lot more?
 
Durability guarantees for one
 
@ircmaxell that's at a first look routed pub/sub...? and workers.
 
Yes, a high level intro
Dig through the docs to understand more what separates it from something like redis
 
imo sadness #33 seems valid...
 
@Orangepill just bind a simple closure to a context and be happy.
Closure::call() makes it even easier.
 
2:10 AM
@Orangepill then you are designing your code wrong.
 
that doesn't change the fact the behavior is not intuitive...
I personally can't recall a time that I have had an issue with it but $this to me should reflect the calling class scope... not the defining scope.
 
It does
 
yeah I realized that... just once removed
 
@ircmaxell not sure, except that it has built-in queues, which you'd realize in redis with a simple BRPOP on a list...
Actually googling "rabbitmq vs redis" gives me no real indication there'd be a major difference. Just that sometimes a few things are built-in in rabbitmq, which need a few more commands in redis, but nothing impossible.
 
2:42 AM
@bwoebi does redis give you message durability? Guaranteed delivery in a high availability environment?
 
@ircmaxell you'd temporarily lock, fetch and only then remove. Upon disconnect the lock would be freed. … It's not built-in, but you can do it with redis.
 
Might work for one consumer, how would you do that for 500?
Also, that's not how you implement queues. That's how you implement a key value store
 
Well, too much half-knowledge here. I don't know how it scales. (never tried) I just know that it actually works.
 
Think less how it performs, and more how it tolerates pulling the plug on a machine at random
 
How can I edit a td which I can edit the value after clicking a button? Can someone help please?
Like if I clicked modify button. It will go to the specific td which I can change the value
 
2:59 AM
@ircmaxell I seriously don't know.
 
@bwoebi that's a very important thing to know when you are talking about a cornerstone of your system architecture...
 
@ircmaxell right. But I haven't yet experimented with redis (for real I mean… not just toying around.)
 
:(
 
@bwoebi To me it is an intelligent cache. Nothing more. I know people use it as a data store or a queue or whatever, but to me that's idiotic, you don't get any resilience or integrity guarantees. And those were insanely important at any non trivial scale...
 
Can someone help me in this room?
 
3:17 AM
@ircmaxell well, depends on the use case (whether you need that safety), but in general, you are right. But still, what'd happen when the instance which feeds the queue crashes? then we still may have lost some data.
you ultimately just get a certain degree of safety. you never reach 100%… but… still, use the tool which fulfills the needs.
anyway… good night :-)
 
Is this a PHP room? cause no one helps
 
@Micaela it is… but you aren't talking about a PHP problem.
 
hahaha
 
editing tds sounds much more like JS … and like beginners stuff… We're not a living tutorial :-)
 
3:33 AM
yup im a beginner. i'm sorry.
 
@Micaela no problem, everyone is (at least) once. But first try learning in general before asking for help here. We're always happy to help people after they did their own research etc.
 
3:48 AM
We'll be using Redis for sessions. We don't care if the plug gets pulled :D
 
4:29 AM
Too. Many. Root Beer Beers.
 
4:40 AM
@Sara is there such a thing?
 
Ask me after I puke these up...
 
I guess the answer is yes then.
 
4:57 AM
Morning
 
Morning
 
5:36 AM
moin
 
5:47 AM
mornin
 
mornings
@LeviMorrison or the switch does the disco dance
 
6:04 AM
0
A: pthreads access to resource globally in PHP

Joe WatkinsDo not try to use globals in threads. The PTHREADS_ALLOW_GLOBALS constant and functionality is there for a special use case, it is not intended for use by everyone, in addition globally has been removed in v3. There is a much tidier way of doing what you want to do, that actually works. Resour...

I said a thing ...
 
morning!
 
I'm thinking about buying a used x230 thinkpad. any experiences with the model and linux (Ivy-Bridge)?
 
are these secure to eat?
 
6:19 AM
@Gordon from what I can see through the bag, entropy appears high, they should be good ...
 
@hakre why would you buy an x230 when the current model is the x250? the x230 has a 1300 resolution and packs only 8gig ram. the x250 has full hd and 16gig.
@JoeWatkins ;)
@hakre apart from that, the x series is great
 
@Gordon dunno if there's a x250 to offer. I know the smaller resolution would be OK for me and I would have the model with 16GB RAM configured. But I'll take a look for your suggestion.
I just need a small one for on the road / bike.
 
@hakre I am not sure it can actually have 16 gig
 
@Gordon the x230 is up to 16GB, checked that :)
Also the model offered has a larger SSD configuration.
 
ok cool
 
6:36 AM
@AshleyIvy Good morning :)
 
6:46 AM
@underscore
can someone help me here? in my case ApprovePartial
I want to insert this query in that sql query in approvepartial. SELECT * FROM tb_empgrocery where order_no='order_no'
 
use mysqli
i won't click that link though, use pastebin
 
heya pat
 
im using mysqli
 
paste ur code to pastebin if you want help real quick
 
Jesus, why is it so hard to find any tutorials online anymore
 
is order_no trusted data? or is that variable from a users input?
 
please look at my case ApprovePartial
I want to insert this query. I have tb_empgrocery and tb_emgroc_master that has the same field whis I want to select only those with the same values
 
where is $atecCoop being initiated?
 
that code works fine
 
7:04 AM
check your column definitions for this part " tb_empgrocery.item_no = tb_groceryitems.itemno"
 
i just only want to select order_no from tb_empgrocery that with the same value of order_no in tb_empgroc_master
 
are you sure it's not .item_no at the end?
 
i want to insert that query in this query "SELECT * FROM tb_empgrocery INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.itemno"
how I will combine that?
 
I think you might just have a spelling error in the column name
type describe tb_groceryitems for me and give me the read out please
"describe tb_groceryitems;"
into the mysql terminal
or just try replacing tb_groceryitems.itemno with tb_groceryitems.item_no and see if that fixes it.
 
I have 3 tables. tb_groceryitems, tb_empgrocery and tb_empgroc_master. The reason I put this query ("SELECT * FROM tb_empgrocery INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.itemno") is because I want to show currqty and qty_ordered from tb_groceryitems and there relationship in itemno.
 
7:09 AM
I get why you're doing that. I just want to check for a common error.
 
what i'm going to replace again?
 
$sql = "SELECT * FROM tb_empgrocery INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.item_no";

try that.. you might just be missing an underscore.
 
moin
 
moin
 
7:12 AM
it has no error
 
what error do you get when you run

SELECT * FROM tb_empgrocery INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.itemno?
 
nothing
the data shows
I'll show you my tb_empgroc_master
wait
 
you know instead of going back and forth guessing, trying to use chat as an interface for a remote sql server, you might set up an mcve at sqlfiddle.com and work it out there
 
select * from tb_empgrocery inner join tb_groceryitems on tb_empgrocery.item_no = tb_groceryitems.itemno; should work
 
yes it works
 
7:19 AM
but returns no data?
 
it has
 
Abe
o/
 
nothing wrong with that query
 
it says it returned 2 rows
 
my question is..
 
7:21 AM
thanks paul, I'll look into that later
 
tb_empgrocery and tb_empgroc_master has a relationship also which is the field order_no
 
I don't have any experience with sqlfiddle
 
now I want to show items in tb_empgrocery that has the same with the order_no from tb_empgroc_master
 
oh
cool
 
but how I will combine it to that query
this query "SELECT * FROM tb_empgrocery INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.itemno"
 
7:23 AM
select * from (select order_no from tb_empgrocery inner join tb_groceryitems on tb_empgrocery.item_no = tb_groceryitems.itemno);
opps
select * from tb_empgroc_master where order_no IN (select order_no from tb_empgrocery inner join tb_groceryitems on tb_empgrocery.item_no = tb_groceryitems.itemno);
try that please
 
all values are 0
shown
 
can you show me?
 
wait wait
 
hai guys does this, mysql query is correct for fetching an id between two date and time, SELECT id FROM amount_sanctioned WHERE date_and_time BETWEEN 03/11/2015 AND 09/10/2015;
 
u might need single quotes around the dates, I don't remember
 
7:29 AM
@Porlune Here's my two tables tb_empgrocery and tb_empgroc_master imgur.com/a/W6xSo
 
@Porlune i tried that too sir but it doesnt work :(
 
you see the order_no relations??
 
yes
maybe there is a language barrier, I might be misunderstanding what data that you want.
 
how can I show those same values
 
hi guys
 
7:31 AM
like there are three 15-09-0000000001 in tb_empgrocery
and one 15-09-0000000001 on tb_empgroc_master
I want to show those 3 15-09-0000000001 in tb_empgrocery
when I click the ApprovePartial
 
I am getting error 304 in firebug for this image http://userserve-ak.last.fm/serve/_/41294475/Charles+Aznavour.jpg sometime 200 OK status and sometime `An error occurred while processing your request.

Reference #99.b630dd58.1442820620.4440ad7 `
 
it says there are two 15-09-0000000001 in tb_empgrocery on your image
 
oh sorry
 
any idea?
 
i mean twoo
what's the query for that? how can I show those two 15-09-0000000001 in tb_empgrocery when I click the approve partial?
 
7:36 AM
select * from tb_empgrocery where in(select order_no from tb_empgroc_mast);
 
morning!
 
hai guys this query is not working, its executing but it doesnt return any values SELECT id FROM asan WHERE date_and_time BETWEEN 03/03/2015 AND 08/06/2015 ORDER by id DESC;
 
@Porlune then How I will combine that query in this query? SELECT * FROM tb_empgrocery INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.itemno
SELECT * FROM tb_empgrocery INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.itemno where in(select order_no from tb_empgroc_mast); ??
hahaha
i'm sorry if i have so many questions. im new in programming
 
@Crysis SELECT id FROM asan WHERE date_and_time BETWEEN CAST('03/03/2015' AS DATE) AND CAST('08/06/2015' AS DATE) ORDER by id DESC;
 
Good morning
 
7:40 AM
Can I do this 2 queries together?
select * from tb_empgrocery where in(select order_no from tb_empgroc_mast);
SELECT * FROM tb_empgrocery INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.itemno
in one query?
 
SELECT * FROM tb_empgrocery INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.itemno where tb_empgrocery.order_no in(select order_no from tb_empgroc_mast);

might work
 
@Porlune ty wil try and say
 
Someone see something wrong with this basic setup for a custom form builder? :)
http://hastebin.com/rebitoduma.coffee
 
@Porlune here my date_and_time is a timestamp , the query u suggested doesnt return any result
 
yah cry?
 
7:42 AM
I tried. It shown six values
 
@Crysis try putting your dates between #
@Duikboot o/
 
o\
 
auch that must hurt :)
 
SELECT id FROM asan WHERE date_and_time BETWEEN CAST('2015-03-03' AS DATE) AND CAST('2015-08-06' AS DATE) ORDER by id DESC;

I forgot that it's supposed to be year-month-day
 
What does that mean, "o/"?
 
7:44 AM
it means hello? You know, guy waving it's hand?
 
must be two only haha
 
Well yah, it should show 6 values.
No, because you have both of those orders in your master database.
 
why?
 
Damn now I see it :D haha
 
@Porlune its working but iam getting date from date picker there value come 01/05/15 any idea?
 
7:46 AM
\o/ 4 days till friday \o/
 
yah, we can use a split to turn it into an array
then just build a string using year-month-day
 
@ScottArciszewski "Invert control flow" = Check error first, do not use else
 
@Porlune Thk u sir
 
moin niki
 
ahmm.. I want only those 2 values bacause. I have a table which is tb_empgroc_master and has a class and when I click on that first order_no=15-09-0000000001. It must show only the two values of order_no=15-09-0000000001 from tb_empgrocery
@Porlune
 
7:48 AM
var date = "12/01/2001";
var arr = date.split("/");
date = arr[2] +"-"+ arr[0] +"-"+ arr[1];
console.log(date);
okay, so you need to supply that value then
SELECT * FROM tb_empgrocery INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.itemno where tb_empgrocery.order_no in(select order_no from tb_empgroc_mast) WHERE tb_empgrocery.order_no = [YOUR VARIABLE];
 
Just sharing: pbj.me/writing/the-hardest-part [ off topic ]
 
SELECT * FROM tb_empgrocery INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.itemno where tb_empgrocery.order_no in(select order_no from tb_empgroc_mast) WHERE tb_empgrocery.order_no = '15-09-0000000001';

should give you two values.
but then, I don't understand why you need to do the join.
 
No datas shown
 
une
156
SELECT * FROM tb_empgrocery INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.itemno where tb_empgrocery.order_no in(select order_no from tb_empgroc_mast) WHERE order_no = '15-09-0000000001';
 
is it okay if it has two where?
 
7:55 AM
place AND between the statements
WHERE 1=1 And 0=0;
 
how
 
well I'mma get going, hope you figure it out!
 
Thank you
 
posted on September 21, 2015 by nlecointre

/* by d4b0urn4 */

 
@Porlune Thank you "SELECT * FROM tb_empgrocery INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.itemno WHERE tb_empgrocery.order_no IN(SELECT order_no from tb_empgroc_master WHERE order_no = '15-09-0000000001')"
 
8:03 AM
hello I have added a vimeo video in my website. The problem is it is showing accurately when I view on desktop but it doesn't show up on the mobile
see http://fosterwellnessgroup.com/
any idea whats wrong here?
 
What iam i wrong in this codeigniter query $this->db->where("date_and_time BETWEEN CAST(".$custom_first_date."AS DATE) AND CAST(".$custom_second_date."AS DATE)");
 
@TheodoreBrown yes, that is also one of the best.
 
@NikiC how does the latest commit look?
 
@ScottArciszewski hi
 
8:13 AM
@ScottArciszewski I learned this weekend that syscalls are documented like functions
 
morning
 
but they're totally not functions :P
 
tried for a while to use getrandom()...
apparently, it has to be wrapped by libc.
 
I have a function, and I need to that function in the a script.php, now my question is, If I write that function into script.php or if I write that function into a separated file and then incude() it in the script.php, there is any difference in the speed of processing ?
 
@saja
 
@Sajad I don't think so, not 100% sure though
 
@Karma ah, your mean is including will not reduce the speed ?
 
8:17 AM
What iam i wrong in this codeigniter query $this->db->where("date_and_time BETWEEN CAST(".$custom_first_date."AS DATE) AND CAST(".$custom_second_date."AS DATE)");
 
@ScottArciszewski looks fine
What did you think about removing arc4random?
 
I don't think RC4 will greatly degrade the randomness of a system
 
@Sajad maybe it will be a few nano seconds or ms as it needs to locate the file from the web server and load it, but I don't think you should be affected by it, what do you need to achieve that you're asking?
 
it's an academic concern, and RC4 should not be used for stream ciphers any more
but the OS's CSPRNG is rekeyed frequently
and on the affected OSes, urandom uses RC4 anyway
 
Mournday
 
8:20 AM
 
@ScottArciszewski no...?
 
@Sajad have you found a performance problem, profiled your script, and discovered that to be your bottle-neck? no? then stop worrying about it.
 
it doesn't?
do they still use SHA1 mixing then?
 
At least some OSes that have broken arc4random still use something like Yarrow for urandom
 
@Karma ah, actually I have several script like these: Votes.php, Comments.php, Favorites.php and ..., each of them need to one function, that function is constant for all of them, now I want to know it is better to I write that function in the separated file and then include() it to all scripts or I write that function in the all scripts ?
 
8:22 AM
I don't have a problem with it personally
I'd do that as a separate PR though, so it can be discussed in isolation
 
@PaulCrovella :-) honestly I'm obsession a bit, and I can not be apathetic even for 0.0001 sec
 
What iam i wrong in this codeigniter query $this->db->where("date_and_time BETWEEN CAST(".$custom_first_date."AS DATE) AND CAST(".$custom_second_date."AS DATE)");
 
um
where do those variables come from, what do their expected values look like, is it possible that someone can use this for SQL injection?
second: wrap them in single quotes
third: do you want a DATE or a DATETIME?
fourth: does mysql support date range operations? I know pgsql does
 
@Sajad You've been told before to prioritize keeping your code readable, testable, and maintainable; particularly over meaningless premature micro-optimizations. Yet you insist on ignoring that.
You are being apathetic about the things that matter when you waste your time on that shit.
 
@PaulCrovella no I don't insist to ignoring that, I think using a function in the separated file and then include it in the several script is more readable, so should I go with "separated file" ?
 
8:28 AM
want to micro-optimize your scripts? write in x64 ASM
@voodooKobra They forgot to mix the Flappy Bird high score.
lmao
 
Hi can anyone help me create an array from another multidimentional array?
 
hm
is there a way to get all the exts on pecl?
as in, an url with the list?
if it doesn't exist yet, who can I bother to get it?
 
8:47 AM
can anyone provide assistance with creating dynamic links on a table for each row?
 
@FlorianMargaine For 1st loop 1 sub_sub_menus coming but I want here to set another that will come from next loop
 
hi guys, any one could help me how to do this. Add a new div once the height exceeds current div content.Data will be in dynamic data
 
there is any website for give me the time of execute a php code ?
 
@Sajad what?
 
8:51 AM
@Sajad here eval.in
 
I have 10 line php code, there is any website to tell me what time need to execute these lines ?
@LemonKazi thanks :-)
 
@Sajad :) thank you too.
 
@salathe <3
 
@Sajad use xampp, it gives you a local apache and db serwer
 
8:54 AM
@LemonKazi what is "Private" checkbox?
@Karma yea, it can be good too, but I need to the "time" of execution
 
I forget who has php-src commit access, but
if any of y'all can look at PR 1513 before RC4 I'd appreciate it
... wow, there's a joke there
 
@Sajad private if you do not want to share this url with others after execute your code.
 
@LemonKazi ah alright.
 
can someone take a look at this please stackoverflow.com/questions/32628786/…
I'll be here to answer any questions
 
9:14 AM
How can I combine these two queries?
SELECT * FROM tb_empgrocery INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.itemno
SELECT * FROM tb_empgrocery INNER JOIN tb_empgroc_master ON tb_empgrocery.order_no = tb_empgroc_master.order_no???
 
@samayo Did you try the usual places like jobs.ch? There are quite a few php jobs on there. If you are a decent developer it should be easy to find something
 
@Micaela union
 
@Naruto UNION ALL?
 
@Micaela After query you can marge this 2 array.
 
How?
I want them in one query
@LemonKazi
 
9:31 AM
$a = mysql_query("SELECT * FROM tb_empgrocery INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.itemno");
$b = mysql_query("SELECT * FROM tb_empgrocery INNER JOIN tb_empgroc_master ON tb_empgrocery.order_no = tb_empgroc_master.order_no");
$result = array_merge($a, $b);
 
Please don't advocate the use of mysql_* functions
1034
Q: Why shouldn't I use mysql_* functions in PHP?

Madara UchihaWhat are the technical reasons why I shouldn't use mysql_* functions? (e.g. mysql_query(), mysql_connect() or mysql_real_escape_string())? Why should I use something else even if they work on my site?

 
SELECT * FROM tb_empgrocery INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.itemno
UNION
SELECT * FROM tb_empgrocery INNER JOIN tb_empgroc_master ON tb_empgrocery.order_no = tb_empgroc_master.order_no???
-UNION removes duplicate records while UNION ALL does not.
 
Anonymous
@Patrick Yes, I have tried almost as many as there are job sites including SE which I check everyday. There are plenty of jobs, but I guess it's down to luck so I have no result yet.
 
Anonymous
even for the jobs I think I would be a little over qualified, none.
 
@TarunUpadhyay no data shows
@Fabor im using mysqli
 
9:38 AM
@Micaela do these two individual queries yield rows?
 
@TarunUpadhyay I have three tables. tb_groceryitems tb_empgrocery tb_empgroc_master. In first query I am showing fields from both table (tb_groceryitems and tb_empgrocery) and their relationship is itemno-item_no. And then Now I want to show all of those rows in tb_empgrocery that has the same values in tb_emgroc_master and their relation is order_no. order_no is unique
The first query works fine
"SELECT * FROM tb_empgrocery INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.itemno WHERE tb_empgrocery.order_no IN (SELECT order_no from tb_empgroc_master WHERE order_no = '15-09-0000000001')"
but if i change it to "SELECT * FROM tb_empgrocery INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.itemno WHERE tb_empgrocery.order_no IN (SELECT order_no from tb_empgroc_master WHERE order_no = 'order_no')" No data shows
 
9:53 AM
I have a PHP page where you can insert new people. On the SQL database a person has their own unique ID, how do I select the highest ID, increment it by one and assign it to the person that is being added on the form
 
Can you try this.
SELECT * FROM tb_empgrocery groc INNER JOIN tb_groceryitems ON tb_empgrocery.item_no = tb_groceryitems.itemno WHERE tb_empgrocery.order_no IN (SELECT order_no from tb_empgroc_master grosmaster WHERE order_no = groc.order_no)
 
@JoeWatkins saw that some days back... it's hilarious
 
user3119231
hm, maybe someone knows how to check if the exploded is in quotes to prevent it to be splitted?
 
user3119231
$csv = file_get_contents("temp/".$_GET['csv']);
			$aa = explode("\n", str_replace('', '', $csv));
			$lines = explode(",", $aa[$i]);
			for ($v = 0; $v < count($lines); $v++){
				array_push($line, $lines[$v]);
			}
 

« first day (1801 days earlier)      last day (3150 days later) »