Jump to content


mysql not inserting all data

  • Please log in to reply
1 reply to this topic

#1 tryant4d

  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 07 March 2006 - 12:51 PM

Hi folks.
I'm using php to dynamically create a query from an array. When the query is run, it doesn't always insert all of the data. Some of the last columns are ignored. It happens on very long inserts... with over 50 columns in the table. But each column, with the exception of the first and optionally the last, are single digits

Is it timing out? Too big for a buffer?

How does one get around this?

$connection = mysql_connect($db, $db_user, $db_pass) or die('1 '.mysql_error()); 
mysql_select_db($db_2, $connection) or die('2 '.mysql_error()); 
/*** constructing query that inserts data into table ***/ 
$query = "INSERT INTO ".$sectionName." (coID,"; 
$query = $query.$sectionNumber."_".$i.", "; 
$query = $query.$sectionNumber."_".$i.")"; 
$query = $query." VALUES (\"".md5($_SESSION['setup']['coname'])."\",\""; 
$query = $query.$_SESSION['currentSection'][$i]."\",\""; 
$query = $query.$_SESSION['currentSection'][$i]."\")"; 
/*** cleaning query text ***/ 
$query = validateQuery($query); 
if($result = mysql_query($query, $connection)){ 



#2 wickning1

  • Members
  • PipPipPip
  • Advanced Member
  • 405 posts

Posted 07 March 2006 - 01:49 PM

Show us an echo of the query after it's finished, just before you give it to mysql_query()

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users