select * from A left join B on A.columnc=B.columnd   results returned by above SQL will include both columns of A and B.  And what if A and B have some columns with the same name?  How to retrieve the value from PHP?
I have two tables in my database:  NEWS table with columns:   id - the news id  user - the user id of the author)   USERS table with columns:   id - the user id   I want to execute this SQL:   SELECT * FROM news JOIN users ON news.user = user.id    When I get the results in PHP I would like to get associative array and get column names by $row['column-name']. How do I get the news ID and the user ID, having the same column name?
Using $g = \frac{Gm}{r^2}$, the force on a point mass located at 1 AU from the Sun ($m = 2 \cdot 10^{30} \text{ kg}$) is about ~0.006 N/kg.  Does that mean that, e.g., a 70 kg person is ~42g lighter during the day, and ~42g heavier at night? That seems like it could make a big difference for things like measuring gold bars or other weight-sensitive items. (Gold arbitrage: buy your gold during the day and sell it during the night! Risk-free profit!)  This makes me suspect that I'm overlooking something obvious, because a ~0.05% weight difference seems like something everyone would have noticed long ago. So what am I missing?    Edit: A few answers below indicate that there shouldn't be any weight difference, because the Earth orbits the Sun in free-fall. But if that's the reason, does that mean that a 1:1 tidally-locked Earth-Sun system wouldn't experience differential gravity from the Sun on opposite sides? That doesn't seem right. I've seen a couple questions around here like , which mentions:     Unfortunately that same browser won't allow me to test HTTP PUT, DELETE, and to a certain degree even HTTP POST.   I've also heard that browsers support only GET and POST, from some other sources like:        However, a few quick tests in Firefox show that sending PUT and DELETE requests works as expected -- the XMLHttpRequest completes successfully, and the request shows up in the server logs with the right method. Is there some aspect to this I'm missing, such as cross-browser compatibility or non-obvious limitations? How do I change the computer name? Let $T:V\to V$ be a linear map, where $V$ is an inner product space. Given $T^2=\frac{T+T^*}{2}$, prove that $T$ is normal and that $T=T^2$. Let $T:V\to V$ be a linear map, where $V$ is a finite-dimensional inner product space. Given $T^2=\frac{T+T^{*}}{2}$, I would like to prove that $T$ is normal and that $T=T^2$. The first part, to prove that $T$ is normal, is quite easy: from $T^2=\frac{T+T^{*}}{2}$ we'll have $\,T^{*}=2T^2 - T$, and as $TT^{*} = 2T^3 -T^2 = T^{*}T$. Now, I need to prove that $T=T^*$, then $T = T^2$ is immediate. I have been thinking about this question for some days and I can't figure out in what technique to prove that $T = T^{*}$. How to show $ \sin x \geq \frac{2x}{\pi}, x \in [0, \frac{\pi}{2}]$? I have tried the following: $$ f(x) = \sin x-\frac{2x}{\pi} \\ f'(x)= \cos x-\frac{2}{\pi} \\ f''(x) = -\sin x \leq 0 $$ But this doesn't seem to be heading in the right direction as it would appear $f'(x)$ is decreasing and has a zero within the domain, so I'm not sure how this might be used to prove the inequality. How do I format a Decimal to a programatically controlled number of decimals in c#? idempotents acting as local identities Let $R$ be a ring with unity (not necessarily commutative) and $I$ an ideal of $R$.  Suppose that for every element $a \in I$ there exists an element $c\in I$ such that $ac=a$. Note that $c$ is related to $a$. Now we have the following question:  Can we say that  for every element  $a\in I$ there exists an idempotent element $c\in I$ such that $ac=a$?    Of course we have many examples such that the answer is true for them but in general  we don't know. Is "performance" singular or also plural? Why do mathematicians use single-letter variables? Updated Ubuntu 16.04, now I'm running Kali? Updated Ubuntu 16.04 today using the software updater. Now my PC is running Kali? There were something like 2Gb of updates, which I thought at first was because I haven't updated in a while. Now I'm thinking that it was downloading Kali. Here's a  of the new boot-up process.  The screen will continue to flicker for another 30 seconds or so, then stop flickering leaving the text on the screen. I tried switching the display manager from gdm to lightdm, which will boot me straight to the console and without flickering, but still no desktop.  I'm not altogether sure how I managed to accomplish this. It must have been when I was trying to get Katoolin running.  Any tips as to how I can either get the desktop or revert the updates?  Contents of cat /etc/lsb-rolling:  DISTRIB_ID=Kali DISTRIB_RELEASE=kali-rolling DISTRIB_CODENAME=kali-rolling DISTRIB_DESCRIPTION="Kali GNU/Linux Rolling" The impression that I got from the  films was that if  was successful, most of the world was going to suffer greatly. Basically everyone would serve Voldemort as slaves or die. So what's the point of serving someone who's probably going to ultimately end up betraying and/or enslaving you? I know the  hated , but is that really enough to justify tearing down Wizard society? Why exactly do the Death Eaters serve Lord Voldemort? Fear? Is the post-Voldemort world not that bad? (I for one welcome our ) Why must we "avoid discussions in comments"? I've just started getting these messages:     Please avoid extended discussions in comments. Would you like to automatically move this discussion to chat?   Why should one avoid doing this? I think it adds to the site...  (Tagged  in more ways than one!) Primary filegroup is full SQL Server 2008 Tangential component of Electric field The above question i'm trying for so long but failed. This is from my class $12$ book(india).First of all i'm confused with tangential component of electric field, I mean why this? So far I've studied that electric field(Whether its own or someone's else) is always perpendicular to a charged body. So, there shouldn't be any tangential component. Could someone please explain me visually what's happening?  Strict Note: A class $12$ answer required. No complex statements please. Only for school childs. Square root of 1 is (not) -1 Possible Duplicate:          I was thinking on the following line of thoughts: $1 =  \sqrt{1} = \sqrt{-1 \cdot -1} = \sqrt{-1} \cdot \sqrt{-1} = i^2 = -1$  Of course this is not true, but I was wondering which step in this 'line of thoughts' is forbidden to make?   Thanks for the explanation. Detect which TeX engine is used How can I detect inside a TeX file which engine (pdftex/xetex/luatex) is used to compile the file? Is there a LaTeX package that provides this functionality? Is there a way to include all the jar files within a directory in the classpath?  I'm trying java -classpath lib/*.jar:. my.package.Program and it is not able to find class files that are certainly in those jars.  Do I need to add each jar file to the classpath separately? Restricted logins with automatic full permission in databases My scenario: I have some groups with full - and inappropriate - access to all Sql Server instances. I want to change that.  My Plan: Give full and automatic access to all databases (it is customer databases and this groups must be allowed to change any property if necessary).  Restrict permissions on Instance Level, because this groups should not be allowed to do any unexpected change on instance properties.  I don't want to create a user in databases, because our external customer could drop the user ( they have db_owner permission )  Someone have any idea? Tks How can I access and process nested objects, arrays or JSON? How do I detect running processes using a library package? This command is doing the rounds for detecting currently running processes using glibc:  lsof | grep libc | awk '{print $2}' | sort | uniq   I find it intensely annoying, since /libc/ matches not only libc, but on my system:  /lib/x86_64-linux-gnu/libcap.so.2.24 /lib/x86_64-linux-gnu/libcgmanager.so.0.0.0 /lib/x86_64-linux-gnu/libcom_err.so.2.1 /lib/x86_64-linux-gnu/libcrypt-2.19.so /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/libcamel-1.2.so.45.0.0 /usr/lib/unity-settings-daemon-1.0/libcolor.so /usr/lib/unity-settings-daemon-1.0/libcursor.so /usr/lib/x86_64-linux-gnu/colord-plugins/libcd_plugin_camera.so /usr/lib/x86_64-linux-gnu/colord-plugins/libcd_plugin_scanner.so /usr/lib/x86_64-linux-gnu/gtk-3.0/modules/libcanberra-gtk3-module.so /usr/lib/x86_64-linux-gnu/libcairo-gobject.so.2.11301.0 /usr/lib/x86_64-linux-gnu/libcairo.so.2.11301.0 /usr/lib/x86_64-linux-gnu/libcanberra-0.30/libcanberra-pulse.so /usr/lib/x86_64-linux-gnu/libcanberra-gtk3.so.0.1.9 /usr/lib/x86_64-linux-gnu/libcanberra.so.0.2.5 /usr/lib/x86_64-linux-gnu/libcap-ng.so.0.0.0 /usr/lib/x86_64-linux-gnu/libck-connector.so.0.0.0 /usr/lib/x86_64-linux-gnu/libcolordprivate.so.1.0.23 /usr/lib/x86_64-linux-gnu/libcolord.so.1.0.23 /usr/lib/x86_64-linux-gnu/libcroco-0.6.so.3.0.1 /usr/lib/x86_64-linux-gnu/libcupsmime.so.1 /usr/lib/x86_64-linux-gnu/libcups.so.2 /usr/lib/x86_64-linux-gnu/samba/libcliauth.so.0 /usr/lib/x86_64-linux-gnu/samba/libcli_cldap.so.0 /usr/lib/x86_64-linux-gnu/samba/libcli-ldap-common.so.0 /usr/lib/x86_64-linux-gnu/samba/libcli-nbt.so.0 /usr/lib/x86_64-linux-gnu/samba/libcli_smb_common.so.0 /usr/lib/x86_64-linux-gnu/samba/libcli_spoolss.so.0 /usr/lib/x86_64-linux-gnu/samba/liblibcli_lsa3.so.0 /usr/lib/x86_64-linux-gnu/samba/liblibcli_netlogon3.so.0   I understand that libc is used by pretty much everything, but I'd like to refine this command. Consider its applications for other libraries. How can I do this?  The flaw in this approach, in my opinion, is that the package providing libc may include a whole host of other shared library files (all of which may or may not be covered under the umbrella term that is the library name, like glibc, or libboost-python). Using a word boundary or - to mark the end of libc doesn't really fix this. This may not be a flaw, perhaps, as Braiam points out, since many or all of these .so files may link to a core file in which the flaw resides, as is the case for libc6 on Debian.   If a specific OS/distro is needed, assume Debian Linux.  Also annoying is that this command could be condensed to lsof | awk '/libc/{print $2}' | sort -u.