this should work....... $result=mysql_query("INSERT INTO $table wf_FirstName1,wf_LastName3) VALUES ('".mysql_real_escape_string($wf_FirstName1)."', '".mysql_real_escape_string($wf_LastName3)."')"; :)
Apostrophe Delimiter In the MySQL version of SQL, you signal the beginning and the end of a string with either single quotes or double quotes. Both of the following examples are valid: INSERT INTO COMPANY_TABLE (company_name) VALUES ‘The Fish Shack’; INSERT INTO COMPANY_TABLE (company_name) VALUES “The Fish Shack”; The following example, however, creates an error: INSERT INTO COMPANY_TABLE (tag_line) VALUES ‘Eat at Joe’s -- It’s Good Food!’; SQL wants to interpret the string as "‘Eat at Joe’," with everything following the second apostrophe as erroneous. The following text does not fix the problem: INSERT INTO COMPANY_TABLE (tag_line) VALUES “Eat at Joe’s -- It’s Good Food!”; This would work if the text had only one apostrophe between the double quotes, but this text has two. Also, because some Web-page programming languages use double quotes themselves, you may wish to avoid using them in your SQL.
Creating, reading, updating, and deleting resources is used in pretty much every application. Laravel helps make the process easy using resource controllers. Resource Controllers can make life much easier and takes advantage of some cool Laravel routing techniques. Today, we'll go through the steps necessary to get a fully functioning CRUD application using resource controllers. For this tutorial, we will go through the process of having an admin panel to create, read, update, and delete (CRUD) a resource. Let's use nerds as our example. We will also make use of Eloquent ORM . This tutorial will walk us through: * Setting up the database and models * Creating the resource controller and its routes * Creating the necessary views * Explaining each method in a resource controller Table of Contents Getting our Database Ready Eloquent Model for the Nerds Creating the Controller Setting Up the Routes The Views Making ...
Comments
Post a Comment