I am trying to get a query from a database, however, the value I have for bindParam (:name) is not being bound, when I echo $sql and print_r($stmtTwo) the WHERE clause states WHERE :name instead of the string from $wherefinal.  The code I have is:  $sql= "SELECT Species.Species_ID      FROM Species      JOIN (          SELECT Species.Species_ID, COUNT(*) AS mynum          FROM Species_Opt LEFT JOIN Species ON (Species.Species_ID = Species_Opt.SO_Species_ID)          WHERE :name         GROUP BY SO_Species_ID HAVING mynum = 6          ) AS mytable ON Species.Species_ID = mytable.Species_ID"; $stmtTwo = $pdo-&gt;prepare($sql); $stmtTwo-&gt;bindParam(':name', $wherefinal); $stmtTwo-&gt;execute();   with $wherefinal being defined before the sql statement and being defined as:  $where = ""; foreach ($_POST as $k =&gt; $v){     $where .= "(Species_Opt.SO_Option_ID = $v) OR ";  }; $wherefinal = substr($where, 0, strrpos($where, " OR "));   And when echoed, $wherefinal displays:  (Species_Opt.SO_Option_ID = 4) OR (Species_Opt.SO_Option_ID = 12) OR (Species_Opt.SO_Option_ID = 17) OR (Species_Opt.SO_Option_ID = 20) OR (Species_Opt.SO_Option_ID = 21) OR (Species_Opt.SO_Option_ID = 32)   $v is from the value of a radio button from a form that is generated via a different SQL statement and smarty.
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"
Replacing a font in many illustrator files I have several hundred Illustrator files that are formatted similarly, and for legal reasons I need to replace a font in all of them. Even with the 'Find font' tool, that's a hell of a lot of fonts to replace by hand.  Is there some way of automating it? For example, using Bridge? Illustrator (CS5) doesn't offer many options in Bridge, compared to the automation options offered by Photoshop. I also don't see any option for running actions on multiple Illustrator files.  Also, creating a repeatable action for replacing the font doesn't seem to work: instead of repeating my action, it brings up the dialog box an waits for me to tell it to replace them.  As a programmer I'm prepared to edit the files directly if it can be done without breaking them.    Update: The 'Batch...' menu item from Illustrator's actions panel menu allows the same action to be performed on a folder of files. It doesn't fix the Find Fonts action waiting for input though. Toggling the dialog off makes the action do nothing at all. Do you have to take the second leg of a domestic flight? Unable to install "quickly" on Ubuntu GNOME 15.10 When running:  sudo apt-get install quickly   To install quickly I get this output:  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package quickly   Why the error and how can I install it then? How to upgrade to MySQL 8.0? I have a Drupal site 8.6.10 on an Ubuntu server 18.04 with MySQL 5.7.25  I want to update MySQL to version 8.0  Here are the steps I followed :   I backed up my database. I uninstalled MySQL from my server with the commands :  $ sudo systemctl stop mysql $ sudo apt remove mysql-* $ sudo apt purge mysql-* $ sudo apt autoremove $ sudo dpkg -l | grep mysql | grep ii  I added the repository with the command :  $ wget https://repo.mysql.com//mysql-apt-config_0.8.12-1_all.deb  I installed the package with the command :  $ sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb            My problem :   I install MySQL with the command :  $ sudo apt update $ sudo apt install mysql-server    When I do step 5, it installs MySQL 5.7 why does not it install version 8 ? Probability for roots of quadratic equation to be real, with coefficients being dice rolls. I really need help with this question.     The coefficients $a,b,c$ of the quadratic equation $ax^2+bx+c=0$ are determined by throwing $3$ dice and reading off the value shown on the uppermost face of each die, so that the first die gives $a$, the second $b$ and and third $c$. Find the probabilities that the roots the equations are real, complex and equal.   I was thinking about using the fundamental formula but i'm not sure how to go about doing it. Help would be greatly appreciated. How do I turn on SharePoint App store in SharePoint 2013 I am getting this message when I want to add a app:     Sorry, apps are turned off. If you know who runs the server, tell them   to enable apps. What are bitwise operators? In preparation for the eventual deployment of full HTTPS support on Stack Exchange, and also to make the currently available "alpha" HTTPS support more usable, all links from Stack Exchange sites to other Stack Exchange sites should be .  Currently, at least the following places still feature links with explicit http: protocol prefixes:   the page footer, the "Hot Network Questions" and "Community Bulletin" modules in the sidebar,  (the site switcher menu is OK, though),   and, of course,   lots and lots of user-supplied links in post and comment content.   I've posted this feature request with the intent to provide a single central place for tracking these issues, rather than having them scattered across multiple meta threads.  If you find more places on SE where protocol-relative links should be used, please report them below.  I fully expect this request, in its full sense, to be treated as  for the time being; however, these issues do need to be fixed at some point before our HTTPS support is ready for "prime time".  Ps. Yes, the next release of  (v1.10) is going to include a general client-side fix for most of these issues.  In the mean time, the  plugin effectively provides the same functionality, and much more besides. My Y axis is inverted! How do I fix that? When I play Black Ops 2, it seems that my xbox controller is inverted. Example: if I press up, my character looks down and vice versa. It was not like this before. Does anyone know how to reset the controller back to its original settings? How to connect to wifi using just the terminal? Flash drive .docx disappeared files Schengen visa. What qualifies as main destination? I'm planning a multi city trip soon. I'll be applying with the German embassy as I had planned on going to Berlin for 3 days before going to Prague, Vienna, and Budapest for 2-3 days each afterwards.   My question is, it is working out more conveniently for me to instead make Germany my last destination, rendering the first entry clause. And I can only apply with the German consulate as they are the only ones I can find an appointment for in time. Would staying in Germany for 4 days afterwards be enough to classify it as a main destination (as opposed to 2-3 days in the other cities)? What does <<-EOC means? I'd like to know what the minus (-) and the EOC in the command below means. I know some languages like Perl allows you to chose any combination of character (not bound to EOF) but is that the case here? And the minus is a complete mystery for me. Thanks in advance!  ftp -v -n $SERVER  &gt;&gt; $LOG_FILE &lt;&lt;-EOC             user $USERNAME $PWD             binary             cd $DIR1             mkdir $dir_lock             get $FILE             bye EOC Removing lines from text file that contain string at beginning and string at end - and keep one It took me a while to word this best.  Problem 1:  Is there a way to find lines in a text file that have the same string at the beginning and the same strings at the end?   Beginning and end strings not necessarily equal to each other.  Text between the two strings is not consistant in number of characters or number of hyphens.  A hyphen is in between notable strings (which I added to my large text file).  For example:  File:    AAAAA-tjhut-ghyut-FILE1.txt   BBB-fhuj-dnbhg-frt76-FILE2.txt   AAAAA-ghtujukr-hgute7gr-xhyutt-FILE1.txt   AAAAA-VGYT-4d7tt-xhyutt-FILE1.txt   CCCC-fjuk-dryy-fhuj-FILE3.txt   Lines to detect:    AAAAA-tjhut-ghyut-FILE1.txt   AAAAA-ghtujukr-hgute7gr-xhyutt-FILE1.txt   AAAAA-VGYT-4d7tt-xhyutt-FILE1.txt   Problem 2:  Is there a way to remove all but one of the lines containing the duplicate strings at the beginning and end from above?  Before:    AAAAA-tjhut-ghyut-FILE1.txt   AAAAA-ghtujukr-hgute7gr-xhyutt-FILE1.txt   AAAAA-VGYT-4d7tt-xhyutt-FILE1.txt   After:    AAAAA-tjhut-ghyut-FILE1.txt   Big thanks for any advice.  Note: I think using the occurances of the first hyphen and last hyphen can be used to locate the duplicate strings. Select an area in rep graph not working on Chrome The "select an area by dragging across the lower chart" thing is not working on Chrome.  Tested with Chrome 13.0.782.220 m, works with Firefox 6.0.1 and IE 8  Quirk: For some reason, if I open an incognito window, it works. Tried clearing the cache and cookies, still not working. In my past experiences, I have almost never typeset my manuscripts according to the formats required by the journals to which I would like to submit. I leave my manuscripts as produced by the LaTeX article documentclass.  Recently I am wondering: Would such a behavior generally give handling editors a negative first impression? How can I change my Minecraft username? How loud/obvious is a wizard casting a spell? Some spells have somatic and vocal components, that's well known.  How loud must a wizard talk? How obvious/wide should his gestures be?  Some spells that would be awesome would be fairly limited if you need to shout them (ex: mage hand, range 30ft). Redshifting of Light and the expansion of the universe So I have learned in class that light can get red-shifted as it travels through space. As I understand it, space itself expands and stretches out the wavelength of the light. This results in the light having a lower frequency which equates to lowering its energy.  My question is, where does the energy of the light go? Energy must go somewhere!   Does the energy the light had before go into the mechanism that's expanding the space? I'm imagining that light is being stretched out when its being red-shifted. So would this mean that the energy is still there and that it is just spread out over more space? When I open the file in Vim, I see strange ^M characters.  Unfortunately, the world's favorite search engine does not do well with special characters in queries, so I'm asking here:   What is this ^M character? How could it have got there? How do I get rid of it?