How to create sql query with php variable as a column? The database I'm working with necessitates that I prepare my sql query with variable column names. How would I go about setting up a query without knowing the column name before hand? Thanks!  I've searched around the forums and most answers seem to be for an older version of php that is now depricated.   $stmt = $con-&gt;prepare("SELECT * FROM Housing WHERE ? = Staten Island"); $stmt-&gt;execute($borough); echo $stmt-&gt;fetch()[1];
Can PHP PDO Statements accept the table or column name as parameter? Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh-&gt;prepare('SELECT * FROM :table WHERE 1'); if ($stmt-&gt;execute(array(':table' =&gt; 'users'))) {     var_dump($stmt-&gt;fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"
What makes matter travel along geodesics? The relativistic explanation of gravity is geometric, the motion of a body in a field of space-time distortion can be described as being at rest and travelling along a geodesic of that field, but why does it travel along that geodesic? What causes it to move? $f$ differentiable except in $1$ point Assume we have a function $f : \mathbb{R} \rightarrow \mathbb{R}$ such that  $f$ is differentiable for all non-zero $x$, $f$ is continuous at $0$ and  $$\lim_{x \uparrow 0} f'(x) = \lim_{x \downarrow 0} f'(x) &lt; \infty. $$  Is it then true that $f$ is also differentiable at $0$?  If we drop the hypothesis that $f$ is continuous, this is not true since the signums function is a simple counterexample. But what if $f$ is continuous? I don't think this is true but I can't find a counterexample... How do I effectively defeat the Wall of Flesh? How do I join two lists in Java? How can friction do no work in case of pure rolling? Question: If $(1+x)^n=\binom{n}{0}+\binom{n}{1}x+\binom{n}{2}x^2+\dotsm+\binom{n}{n}x^n$, prove that $\binom{n}{1}-2\binom{n}{2}+3\binom{n}{3}-\dotsm+(-1)^{n-1}n\binom{n}{n}=0$  My attempt:  I wrote the expression for $\binom{n}{k}$ for each term in the L.H.S and then tried to simplify but could not reach the R.H.S.  Please help. I have no idea on how to begin. I am not allowed to use calculus. What are the limits of the Room of Requirement? How accurate is approximating the Earth as a sphere? What level of error do I encounter when approximating the earth as a sphere? Specifically, when dealing with the location of points and, for example, the great circle distances between them.  Are there any studies on the average and worst case error compared to an ellipsoid? I'm wondering how much accuracy I'd be sacrificing if I go with a sphere for the sake of easier calculations.  My particular scenario involves directly mapping WGS84 coordinates as if they were coordinates on a perfect sphere (with the  defined by the IUGG) without any transformation. Existence of a local geodesic frame Let $(M,g)$ be a Riemannian manifold of dimension $n$ with Riemannian connection $\nabla,$ and let $p \in M.$ Show that there exists a neighborhood $U \subset M$ of $p$ and $n$ (smooth) vector fields $E_1,...,E_n \in \chi (U),$ orthonormal at each point of $U,$ s.t. at $p,$ $\nabla_{E_i}E_j(p)=0.$  What I've found so far;  Let $V$ be a normal neighborhood at $p.$ Let $(W,x(x_1,...,x_n))$ be a local coordinate system at $p$ s.t. $x(W) \subset V.$  Let $\{X_i:=\frac{\partial}{\partial x_i}\}$ be the standard basis of $T_pM.$ By Gram-Schmidt, there exists an orthonormal basis $\{E_i\}$ of $T_pM.$ Consider the orthonormal frame $E_i(t),$ by parallel transporting $\{E_i(0)=E_i\}$ along a  a geodesic $\gamma :I \to M$ starting at $\gamma(0)=p$ and ending in $\gamma(1)=q,$ where $q \in V.$ This gives us an orthonormal frame at each point of $V.$ To satisfy the second condition, let $E_i(t)=\sum_{l}a_{li}X_l$ and  $E_j(t)=\sum_{s}b_{sj}(t)X_s.$ Then   $$\nabla_{E_i}E_j=\sum_{k}(\sum_{l,s} a_{li}(t)b_{sj}(t)\Gamma^k_{ls}+E_i(b_{kj}))X_k,$$  where $\Gamma^k_{is}$ are Christoffel symbols.   To have $\nabla_{E_i}E_j(p)=0,$ we must have $\sum_{l,s}a_{li}(0)b_{sj}(0)\Gamma^k_{ls}+E_i(b_{kj})(p)=0$ for each $k.$      How can I conclude the argument? Proof of a proposition about recursion definition (Terence Tao's Analysis I) Exercise 3.5.12. Let $ f: \mathbb N \times \mathbb N \to \mathbb N$ be a function, and let c be a natural number. Show that there exists a function $a:\mathbb N\to \mathbb N$ such that $$a(0)=c$$ and $$a(n++)=f(n,a(n))\;for\;all\;n\in \mathbb N,$$ and furthermore that this function is unique. Tao gives the hint: first show inductively, by a modification of the proof of Lemma 3.5.12, that for every natural number $N\in \mathbb N$, there exists a unique function $a_N:\{ n\in \mathbb N:n\lt N\}\to \mathbb N $ such that $a_N(0)=c$ and $ a_N(n++)=f(n,a(n))$ for all $n\in \mathbb N$ such that $n\lt N$.  In my opinion, we could solve it by proving that $\forall n\in \mathbb N,a(n)\in \mathbb N$ according to mathematcial induction.  The property P(n) is:$$\forall n\in \mathbb N, a(n)\;is\;unique$$ P(0) is true. And if P(n) holds, P(n++) is true because different natural numbers must have different successors. $$a(n++)=f(n,a(n))$$ $$a(m++)=f(m,a(m))$$ $$n++=m++\Rightarrow n=m\Rightarrow a(n++)=a(m++)$$ It's similar to the proof of  Proposition 2.1.16 (Recursive definitions): Suppose for each natural number $n$, we have some function $f_{n} : \mathbb{N} \rightarrow \mathbb{N}$ from the natural numbers to the natural numbers. Let $c$ be a natural number. Then we can assign a unique natural number $a_{n}$ to each natural number $n$, such that $a_{0} = c$ and $a_{n{++}} = f_{n} (a_{n})$ for each natural number $n$.  This proof indicates both the existence and uniqueness of the function $a$. I don't know why Tao says it's informal.  But regarding the hint, how do we get the function f even if we've got the conclusion from the hint. Also it seems like the function a(n) can be diffentent considering different N. I don't know if the hint is correct. How to unplug a network cable that's stuck? How do I allow a non-default user to use serial device ttyUSB0? I have an Ubuntu 11.10 system with 2 users:   The first was created during the installation The second instead was created after. It belongs to the sudoers group.   Now the problem is that when the second tries to use a device ttyUSB0 the following error is returned:  "Could not open serial port /dev/ttyUSB0"   I was able to fix it by using:  sudo chown :second_user /dev/ttyUSB0   However when I disconnect the device and reconnect it the problem comes back.  Is there a way to allow different users to access the devices? I suppose I have to add the user to a specific group. Currently the owner is root and the group is dialout. However I'm not sure about the group and I don't know how to add the user.  Thanks! Stopping resetting of linked locators in manipulate Every time I insert the SD card from my camera into the card reader, I get this dialog:    Of course there is no need to scan it. Is there a way to disable it? What items are mutually exclusive between worlds? As of 1.2, some features are mutually exclusive between worlds.  In the case of ores at least, .  However, a  gives you the chance for a  (and the upgraded Sweetheart Necklace) which does not seem to have an equivalent version in the Corruption.    What items, if any, are truly mutually exclusive in function between worlds? Change templates in Xcode How would I change the initial templates created by Xcode when creating a new Cocoa Class.  I am referring to the comments and class name created when using Xcode's new class wizard. Fixed Field of $\sigma, \tau$ Let $k$ be a field and let $K=k(x)$ be the rational function field in one variable over $k$. Let $\DeclareMathOperator{\aut}{Aut}\sigma, \tau \in \aut(K)$ s.t. $$\sigma\left(\frac {f(x)}{ g(x)}\right)=\frac {f(1/x)}{g(1/x)}\qquad \&amp;\qquad \tau\left(\frac {f(x)}{ g(x)}\right)=\frac {f(1-x)}{g(1-x)}.$$ Find the fixed field $F$ of $&lt;\sigma, \tau&gt;$. Determine $\DeclareMathOperator{\gal}{Gal}\gal(k/F)$. Find an $h \in F$ so that $F=k(h)$.   Now for the first automorphism $\sigma$, I think if I concentrate on $k[x]$ it will give me some idea. Now, if $f(x)=a_0+a_1x+a_2x^2+ \cdots + a_nx^n \in k[x]$ then if $x^n \sigma(f(x))=f(x)$ the case will be $a_i=a_{n-i}$ $\forall i=0(1)[n/2]$. So all the funtions in $K$ which will be fixed by $\sigma$ are of the form $\frac {f(x)}{ g(x)}$ where $f(x)=a_0+a_1x+a_2x^2+ \cdots + a_nx^n$ and $g(x)=b_0+b_1x+b_2x^2+ \cdots + b_nx^n$ such that $a_i=a_{n-i}$ $\forall i=0(1)[n/2]$ and $b_i=b_{n-i}$ $\forall i=0(1)[n/2]$.   Please check whether am I right or not?  And any ideas for the rest of the part? Using "recently" with past simple Is it fine to use recently with the past simple tense in the following sentence?     Did you read any books recently?   Is it grammatically correct?  Or do I have to use:     Have you read any books recently? How can black hole increase its mass? I just installed ubuntu 11.10 from a usb stick.   After installation, none of the software which I had collected and run on 11.10 or 11.04 runs on it. Even my newly downloaded opera or chrome installations does not work.  I do not have a internet connection.  Whenever i try to install any .deb file by double clicking it,software center opens up but the install button is grayed out.