Jump to content

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

 

 

 

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.