Jump to content

insert not working


lamox

Recommended Posts

Hi all

I have an insert transaction that just will not work. Am I not seeing anything? Any urgent help will be appreciated!!

Rob

 

<?php require_once('Connections/conYamaha.php'); ?>
<?php
//show all errors
//error_reporting(E_ALL);
//ini_set('display_errors', '1');
//end show all errors

session_start(); 
// Load the common classes
require_once('includes/common/KT_common.php');

// Load the tNG classes
require_once('includes/tng/tNG.inc.php');

// Make a transaction dispatcher instance
$tNGs = new tNG_dispatcher("");

// Make unified connection variable
$conn_conYamaha = new KT_connection($conYamaha, $database_conYamaha);

mysql_select_db($database_conYamaha, $conYamaha);
$query = "INSERT INTO tblregproducts (memId, prodEPrefix, prodENo, prodPurchased, prodActive, prodYamaha, mmonth, yyear ) VALUE ('".$_SESSION['sub_id']."', '".$_SESSION['frPrefix']."', '".$_SESSION['frNo']."', '1', '1', '1', '".$_SESSION['mmonth']."', '".$_SESSION['yyear']."' )";

Link to comment
Share on other sites

"will not work" is in no way enough information for us to provide any meaningful help. We need to know if it's throwing an error, if there's no errors but it's not in the database (as checked by phpMyAdmin), if it's in the database but not being retrieved correctly. After running the query echo out mysql_error() and it will likely contain an error message.

Link to comment
Share on other sites

Are you even running the query?

 

mysql_select_db($database_conYamaha, $conYamaha);
$query = "INSERT INTO tblregproducts (memId, prodEPrefix, prodENo, prodPurchased, prodActive, prodYamaha, mmonth, yyear ) VALUE ('".$_SESSION['sub_id']."', '".$_SESSION['frPrefix']."', '".$_SESSION['frNo']."', '1', '1', '1', '".$_SESSION['mmonth']."', '".$_SESSION['yyear']."' )";

$result = mysql_query("$query") or die(mysql_error());
$row = mysql_fetch_assoc($result);

echo print_r($row); //Display result.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.