I'm new to MySQL, I've created my first data driven website but have some questions about how to best structure it for multiple users.   To explain: The website allows companies to keep track of promotions they are offering. Many companies will use the website and from each company there will be many promotions and many users. The database will contain several table describing the products being offered, sales data etc.  Assuming they successfully login,I assume it's best for each company's info to be stored in separate databases, I see three options for how to structure the data:   Should I also have a distinct database for each promotion?(This will lead to a very large number of databases). Would it be better to only have a single database with data from all promotions appended within the same tables and distinguished the records with a column describing the promotion id? (This strikes me as the simplest conceptually, however, with this approach the tables would become large, and when the user sorts the tables they will have to sort data from all promotions even though they are only interested in a single promotion) Or should I have a single database and create separate tables for each promotion, perhaps by adding the promotion name as a suffix.(This will lead to a very large number of tables within the database over time as each company may have 100 promotions a year).   Sorry for the long question, any help appreciated.  Thanks
When a PHP application makes a database connection it of course generally needs to pass a login and password. If I'm using a single, minimum-permission login for my application, then the PHP needs to know that login and password somewhere. What is the best way to secure that password? It seems like just writing it in the PHP code isn't a good idea.
SharePoint 2013 Jan 2016 Updates Is anyone here experience problems in SharePoint after installing the latest JAN 2016 on 13th Jan 2016 (Western Australian Time) updates for SharePoint 2013. I am guessing it could be KB3114503 update giving me problems.  I am getting the same problem on other machines after running the same updates too.  The problem I am receiving is, on every list view I get this error message below:  TypeError: Unable to get property 'replace' of undefined or null reference   TypeError: Unable to get property 'replace' of undefined or null referenceSys.ArgumentNullException: Sys.ArgumentNullException: Value cannot be null. Parameter name: element Space of bounded continuous functions is complete I have lecture notes with the claim $(C_b(X), \|\cdot\|_\infty)$, the space of bounded continuous functions with the sup norm is complete.  The lecturer then proved two things, (i) that $f(x) = \lim f_n (x)$ is bounded and (ii) that $\lim f_n \in \mathbb{R}$.  I don't understand why it's not enough that $f$ is bounded. I think the limit of a sequence of continuous functions is continuous and then if $f$ is bounded, it's in $C_b(X)$. So what is this $\lim f_n \in \mathbb{R}$ about? Many thanks for your help. What is the symbol on the supply voltage that looks like a shaded-in capacitor? I am looking at  (dual low-voltage power amplifier). On the fourth page, there is a sample circuit; right at the V+ input there is a symbol that looks like a capacitor. However, it looks like it is shaded in. What is that? Some areas of the mesh are dark (Shadow artefacts) I've been modeling a hermit crab and I don't know why but some areas of the mesh are really dark on some spots, like the legs and the claws.   I hope you can help me fix it. I have a question about the following passage on pg. 89 of Zee's QFT in a nutshell:     At first sight, what Dirac wanted does not make sense. The equation is supposed to have the form "some linear combination of $\partial_\mu$ acting on some field $\psi$ is equal to some constant times the field." Denote the linear combination by $c^\mu\partial_\mu$. If the $c^\mu$'s are four ordinary numbers, then the four-vector $c^\mu$ defines some direction and the equation cannot be Lorentz invariant.   The simplest equation I can construct that he is referring to is  $$(c^{\mu}\partial_{\mu}-m)\phi(x)=0, $$  for $m&gt;0$. Taking $\phi(x)\rightarrow\phi(\Lambda^{-1}x)$, and $c^{\mu}\rightarrow\Lambda^{\mu}_{\ \ \nu}c^{\nu}$. Then, the left term transforms like   \begin{align*} \Lambda^{\mu}_{\ \ \nu}c^{\nu}(\Lambda^{-1})^{\sigma}_{\ \ \mu}\partial_{\sigma}\phi(\Lambda^{-1}x) &amp;= \delta^{\sigma}_{\ \ \nu}c^{\nu}\partial_{\sigma}\phi(\Lambda^{-1}x)\\ &amp;=c^{\sigma}\partial_{\sigma}\phi(\Lambda^{-1}x). \end{align*}  Then, we have that   $$ (c^{\sigma}\partial_{\sigma}-m)\phi(\Lambda^{-1}x)=0.$$  But doesn't this show that the equation is Lorentz-invariant? The selection toggle arrows in the Outliner disappeared. Is there some preference in the settings that has to be turned on? Do USA States have reciprocal agreements for learner drivers' permits? Accidental chown under / as root How to make a "reflective tape" material in cycles? How can I make a cycles material that gets very bright when a light is shown on it, yet still has normal colors? I'm talking about the "" that can be seen on road signs, the tape on big trucks (like in the image below), traffic barricades and clothing.  Image by TollGroup on    This reflective stuff has a interesting property where the colors show up perfectly well, but when exposed to a light source they seem to reflect much more light the normal.  has lots of good reference images.  I have tried different combinations of glossy and diffuse shaders, but none work as I have yet to get the super bright reflections.  How can cycles make a material that reflects so much light, and keeps the colors correct? Proof of matrix norm property: submultiplicativity I've been searching for the definition of the submultiplicative (I think it has multiple names from what I've seen) property in proof form. Some books define it as part of the properties that define matrix norms, and some include it as an additional property. I still haven't been able to work it out for myself or find it anywhere.  Let $A$ and $B$ be $n\times m$ and $m\times l$ matrices respectively, prove that:  $$\begin{align} \|AB\| \le \|A\|\|B\|  \end{align}$$ How to show zero before decimal point in bc? echo "scale=3;1/8" | bc   shows .125 on the screen. How to show 0.125 if the output result is less than one? How to prove that $\lim\limits_{h \to 0} \frac{a^h - 1}{h} = \ln a$ Is "guy" gender-neutral? Why has Steve Nash moved to the LA Lakers in sign-and-trade deal? Congratulations to Steve Nash on his move to Lakers !  His contract with the Suns has expired so I don't understand why he moved in a sign-and-trade deal.    Why resign and move in trade? Why didn't the Lakers sign Nash without any trade? Soundness vs completeness, am I understanding? And proving soundness? Is there a preinstalled or automatic firewall? Does Ubuntu come with a preinstalled or automatic firewall? If not, do I need one?   I've read some articles about the advantages of Linux over other operating systems about security (no need to have antivirus, ...) but would like to be sure. How to repair a broken .EXE file association How to check type of variable in Java? How do I get the linksys WUSB6300 wireless adapter to work on linux How to compare the output of \ref to a number? I want to compare the output of \ref to a number in LaTeX. I thought it would be easy but after spending lots of hours surfing the net I still don't know the answer. I found similar questions on this site but I would prefer a solution that does not require another package to be included, so that I can see clearly how the \ref command (and some others) works. I tried a lot of things, some of which I share below, therefore my question is rather long, I'm sorry about that. First, I tried the following codes (the resulting error messages are shown after a % sign):  \begin{equation} \label{eq:myeq}   a=b   \end{equation}  \ifnum\ref{eq:myeq}=1 true\else false\fi % error: "Missing number, treated as zero."  \expandafter\ifnum\ref{eq:myeq}=1 true\else false\fi % error: "Missing number, treated as zero."  \edef\blabla{\ref{eq:myeq}} % error: Incomplete \iffalse; all text was ignored after line 42. \ifnum\blabla=1 true\else false\fi \expandafter\ifnum\blabla=1 true\else false\fi   Of course, \ref{eq:myeq} gave the expected result, namely 1.  Then, I found the definition of \ref using the latexdef ref command:       \ref:   macro:#1->\expandafter \@setref \csname r@#1\endcsname \@firstoftwo {#1}   Further examining \@setref and \firstoftwo, I concluded that the equation number (together with the page number) is stored in a control sequence called \r@eq:myeq. More precisely, the content of \r@eq:myeq is {1}{1} where the first number is the equation number and the second number is the page number. (The output of \expandafter{\csname r@eq:myeq\endcsname} is 11.) If I understand well, in order to obtain the equation number we have to expand \csname r@eq:myeq\endcsname by only two levels to get {1}{1} (the first level of expansion yields \r@eq:myeq), and then we choose the first argument by \@firstoftwo. Since there is no simple way to expand a control sequence by only one level, it is done in a rather circuitous (say tricky) way by \ref. This I could also reproduce by the following code:  \def\sth#1#2{\expandafter #2#1} \makeatletter \expandafter\sth\csname r@eq:myeq\endcsname\@firstoftwo \quad \ifnum1=\expandafter\sth\csname r@eq:myeq\endcsname\@firstoftwo true\else false\fi \makeatother   which resulted in 1   true. So far so good but there are still a few questions. First of all, if the above code works then why does the code with \ifnum1=\ref{eq:myeq}... fail (see above)? Seemingly, the two "algorithms" are doing the same. Second, the above code works only if the auxiliary file (with aux extension) contains the label definition. If it doesn't (the reference is undefined) then LaTeX gives the following error message: Missing number, treated as zero. How can I write a code that works even if the reference is undefined? Thank everybody who read all my above struggle and I would appreciate if someone shed light on the points that were not clear to me and who corrected me where I was wrong and confirmed where I was correct. Unfortunately the whole command syntax of (La)TeX is still very strange to me.