Jump to content

max rows cannot add more to my database


trvsspring

Recommended Posts

I need to add more rows to this table, and I cannot.....????

 

I'm not sure if this is a SQL problem, though when I look at the setup of the table all TYPES are set to (int)11.

 

I'm a newby so i'm not sure if the PHP is scripted to limit database input.  I am at 2249 on my attribute rows.

 

phpmyadmin TABLE_PRODUCTS_ATTRIBUTES below:

 

  products_attributes_id  int(11)    No    auto_increment             

  products_id  int(11)    No  0               

  options_id  int(11)    No  0               

  options_values_id  int(11)    No  0               

  options_values_price  decimal(15,4)    No  0.0000               

  price_prefix  char(1) latin1_swedish_ci  No                 

 

here's the code to the section below:

 

<?php

  $per_page = MAX_ROW_LISTS_OPTIONS;

  $attributes = "select pa.* from " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pa.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by pd.products_name";

  $attribute_query = tep_db_query($attributes);

 

  $attribute_page_start = ($per_page * $attribute_page) - $per_page;

  $num_rows = tep_db_num_rows($attribute_query);

 

  if ($num_rows <= $per_page) {

    $num_pages = 1;

  } else if (($num_rows % $per_page) == 0) {

    $num_pages = ($num_rows / $per_page);

  } else {

    $num_pages = ($num_rows / $per_page) + 1;

  }

  $num_pages = (int) $num_pages;

 

  $attributes = $attributes . " LIMIT $attribute_page_start, $per_page";

 

  // Previous

  if ($prev_attribute_page) {

    echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'attribute_page=' . $prev_attribute_page) . '"> << </a> | ';

  }

 

  for ($i = 1; $i <= $num_pages; $i++) {

    if ($i != $attribute_page) {

      echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'attribute_page=' . $i) . '">' . $i . '</a> | ';

    } else {

      echo '<b><font color="red">' . $i . '</font></b> | ';

    }

  }

 

  // Next

  if ($attribute_page != $num_pages) {

    echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'attribute_page=' . $next_attribute_page) . '"> >> </a>';

  }

?>

Link to comment
https://forums.phpfreaks.com/topic/51350-max-rows-cannot-add-more-to-my-database/
Share on other sites

nevermind i got it.  I'm using echo '<form name="clone" action="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=clone_attributes', 'NONSSL') . '" method="post">';

 

I tried cloning from a different product attribute and is working fine now.

 

if i'm doing something wrong though a good heads up would be great,

thanx ken

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.