i cant understand the way of forming the mysqli query when variables are involved. I have been trying for days different ways modifying it but getting all the time the very same error SQLSTATE[42000]: Syntax error or access violation: 1064. Can anybode help me telling what is wrong with this line of code when the firt variable is a string, as the second as well...?  `$tablename = 'sofka'; $sql = "INSERT INTO " . $tablename . " (" . $columns[1] . ") VALUES (" . $columnsval[1] . ")";`
If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?
I am teaching how to convert from one base to another base, however, I can't find a way to do something like this:    I know little about Tikz, the only thing I have been able to produce is a simple square with a couple of lines over it, so I don't even know where to start. Any suggestions? I don't mind typing all the numbers, what I want to do is to automatize the process of creating the lines. Looking for old book, SF, artificial world, different zones for different species that visitors "inhabit" Database general error: 2006 MySQL server has gone away Recently I started getting an error every time I try and add a content no matter what type.  This is the error that shows up in the browser:     Additional uncaught exception thrown while handling exception.        Original   PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT COUNT(cid) FROM {comment} WHERE status = :status; Array ( [:status] =&gt; 0 ) in comment_count_unpublished() (line 313 of /Applications/MAMP/htdocs/modules/comment/comment.module).        Additional      PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] =&gt; 1 [:db_insert_placeholder_1] =&gt; php [:db_insert_placeholder_2] =&gt; %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] =&gt; a:6:{s:5:&quot;%type&quot;;s:12:&quot;PDOException&quot;;s:8:&quot;!message&quot;;s:154:&quot;SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT COUNT(cid) FROM {comment} WHERE status = :status; Array ( [:status] =&amp;gt; 0 ) &quot;;s:9:&quot;%function&quot;;s:27:&quot;comment_count_unpublished()&quot;;s:5:&quot;%file&quot;;s:56:&quot;/Applications/MAMP/htdocs/modules/comment/comment.module&quot;;s:5:&quot;%line&quot;;i:313;s:14:&quot;severity_level&quot;;i:3;} [:db_insert_placeholder_4] =&gt; 3 [:db_insert_placeholder_5] =&gt; [:db_insert_placeholder_6] =&gt; ; [:db_insert_placeholder_7] =&gt;  [:db_insert_placeholder_8] =&gt; 127.0.0.1 [:db_insert_placeholder_9] =&gt; 1338336955 ) in dblog_watchdog() (line 154 of /Applications/MAMP/htdocs/modules/dblog/dblog.module).   I also get the following error in my php error file:     PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /Applications/MAMP/htdocs/includes/database/database.inc:2136        Stack trace:   0 /Applications/MAMP/htdocs/includes/database/database.inc(2136): PDOStatement->execute(Array)   1 /Applications/MAMP/htdocs/includes/database/database.inc(664): DatabaseStatementBase->execute(Array, Array)   2 /Applications/MAMP/htdocs/includes/database/database.inc(2315): DatabaseConnection->query('SELECT expire, ...', Array, Array)   3 /Applications/MAMP/htdocs/includes/lock.inc(167): db_query('SELECT expire, ...', Array)   4 /Applications/MAMP/htdocs/includes/lock.inc(146): lock_may_be_available('theme_registry:...')   5 /Applications/MAMP/htdocs/includes/theme.inc(447): lock_acquire('theme_registry:...')   6 /Applications/MAMP/htdocs/includes/bootstrap.inc(427): ThemeRegistry->set(Array)   7 [internal function]: DrupalCacheArray->__destruct()   8 {main}         thrown in /Applications/MAMP/htdocs/includes/database/database.inc on line 2136   I am having a little trouble deciphering these error messages. Could anyone help me understand what's going on here? How do I get Mediatek MT7630E 802.11bgn Wi-Fi Adapter working? It worked with the pre-installed Ubuntu, but after re-installing Ubuntu dual-boot with Windows 8.1, the WiFi is not working.  Is there a driver for this adapter that will work on Ubuntu 12.04? showing that a group of order 45 is abelian How can I get list of symbols, abbreviations, abstract, acknowledgements into Table of Contents before Introduction, and under roman numerals? Evaluating $ \lim_{x \rightarrow 0}\left (\frac{\sin(x)}{x}\right)^\frac{1}{x^2}$ What do you call a person who is utterly independent and a loner? In PostgreSQL, what is the difference between a "Stored Procedure" and other types of functions? I understand the distinction between:   Scalar functions Set-Returning-Functions (SRF)s Internal functions Window functions Aggregate functions of all sorts User-Implemented functions (which in PostgreSQL can be implement in any language) Etc.   In SQL Server "Stored Procedures" are permitted through EXEC. What does that provide over any other function executed with SELECT that returns NULL?  When PostgreSQL gets Stored Procedures what will they bring me, and what is the formal distinction if any between a function and a stored procedure in the spec?  I read Prove that the multiplicative inverse of $a$ modulo $m$ exists if and only if $a$ and $m$ are coprime.  Can someone help me with this? In the Linux system, we can use bellow command to enable packets forwarding:  ~ # sysctl net.ipv4.ip_forward=1 net.ipv4.ip_forward = 1   but how can I realize the same function in Windows?  I use Windows Server 2008 R2. Working with large numbers in PHP "A number of students" vs. "the number of students" Possible Duplicate:          From the grammatical view both are correct, but please explain the difference in meaning:   The number of students in the class is fifteen. A number of students were late for class. TTY doesn't wait for password Prove the statement 'World is not flat' In my graph theory book exercise, I found a problem that:     Prove that the World is not flat using Mathematics     This picture is used in the exercise, but no idea of applying it.  I would have used the angles don't add to $180^\circ$, but the author is using a fourth city. Knowing the interface of ubuntu and editing them Where are the files for the desktop or the interface that appears on the screen stored? And how can we edit them. How are they programmed?  What programming language is used to built the interfaces? How to import a module given the full path? How can I load a Python module given its full path? Note that the file can be anywhere in the filesystem, as it is a configuration option. How does DES decryption work? Is it the same as encryption or the reverse? If DES decryption is the same as encryption done in reverse order, then how can the reversed S-Box convert 4 bits into 6 bits? I use \includegraphics command to insert image to the document. But how can I add a border around this image w/o any margin between border lines and image? It seems to be very easy, but I can't find it in the documentation. "On/at/for/over the weekend" in American English Some sources say that "at the weekend" is wrong, while other ones say it's correct. Which form is acceptable in American English?        On Saturdays her sister Ann usually comes to stay with Mary on/at/for/over the weekend/s.   What are you going to do at/on/for/over the weekend/s?    We are going to Paris on/at/for/over the weekend/s.   Are you going to stay here for/at/on/over the weekend/s?      Which preposition do American English speakers use — at, on, for, over?