<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Cant't make Sql insert work in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cant-t-make-Sql-insert-work/m-p/72335#M44676</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I have an Sql database with about 20 fields in the record. I want to create new records by only adding the values of two of these fields. So I have the following code:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="codebox"&gt;&lt;P&gt;CODE:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.php-forum.com/phpforum/viewtopic.php?f=2&amp;amp;t=29442#" target="_blank" rel="noopener"&gt;SELECT ALL&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;$sql = "INSERT INTO Customer SET Email = '$Email', Accesscode = '$Code' ";
$result = mysqli_query($conn, $sql);		   
      if (!$sql) echo "Error 1002: Connection failed. Try later.";
	  else echo "Success";				
      mysqli_close($Conn); &lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;I have also tried with this:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="codebox"&gt;&lt;P data-unlink="true"&gt;CODE:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;SELECT ALL&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$sql = "INSERT INTO Customer (Email,  Accesscode) VALUES ('$Email', '$Accesscode') ";&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;Both of this gives the echo "Success" message, but no record enters into the table. I have also checked that the $Email and $Accesscode variables are not empty.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sincerely&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 27 Jun 2020 14:02:12 GMT</pubDate>
    <dc:creator>jrjong</dc:creator>
    <dc:date>2020-06-27T14:02:12Z</dc:date>
    <item>
      <title>Cant't make Sql insert work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cant-t-make-Sql-insert-work/m-p/72335#M44676</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have an Sql database with about 20 fields in the record. I want to create new records by only adding the values of two of these fields. So I have the following code:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="codebox"&gt;&lt;P&gt;CODE:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.php-forum.com/phpforum/viewtopic.php?f=2&amp;amp;t=29442#" target="_blank" rel="noopener"&gt;SELECT ALL&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;$sql = "INSERT INTO Customer SET Email = '$Email', Accesscode = '$Code' ";
$result = mysqli_query($conn, $sql);		   
      if (!$sql) echo "Error 1002: Connection failed. Try later.";
	  else echo "Success";				
      mysqli_close($Conn); &lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;I have also tried with this:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="codebox"&gt;&lt;P data-unlink="true"&gt;CODE:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;SELECT ALL&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$sql = "INSERT INTO Customer (Email,  Accesscode) VALUES ('$Email', '$Accesscode') ";&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;Both of this gives the echo "Success" message, but no record enters into the table. I have also checked that the $Email and $Accesscode variables are not empty.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sincerely&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Jun 2020 14:02:12 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cant-t-make-Sql-insert-work/m-p/72335#M44676</guid>
      <dc:creator>jrjong</dc:creator>
      <dc:date>2020-06-27T14:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: Cant't make Sql insert work</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cant-t-make-Sql-insert-work/m-p/72453#M44751</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/38454"&gt;@jrjong&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;I have an Sql database with about 20 fields in the record. I want to create new records by only adding the values of two of these fields. So I have the following code:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="codebox"&gt;&lt;P&gt;CODE:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://www.php-forum.com/phpforum/viewtopic.php?f=2&amp;amp;t=29442#" target="_blank" rel="noopener"&gt;SELECT ALL&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;$sql = "INSERT INTO Customer SET Email = '$Email', Accesscode = '$Code' ";
$result = mysqli_query($conn, $sql);		   
      if (!$sql) echo "Error 1002: Connection failed. Try later.";
	  else echo "Success";				
      mysqli_close($Conn); &lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;I have also tried with this:&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="codebox"&gt;&lt;P data-unlink="true"&gt;CODE:&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;SELECT ALL&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;$sql = "INSERT INTO Customer (Email,  Accesscode) VALUES ('$Email', '$Accesscode') &lt;A href="https://roadrunneremails.net" target="_self"&gt;roadrunner email&lt;/A&gt;";&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN&gt;Both of this gives the echo "Success" message, but no record enters into the table. I have also checked that the $Email and $Accesscode variables are not empty.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sincerely&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Anyone?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 04:05:39 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Cant-t-make-Sql-insert-work/m-p/72453#M44751</guid>
      <dc:creator>jrjong</dc:creator>
      <dc:date>2020-07-09T04:05:39Z</dc:date>
    </item>
  </channel>
</rss>

