trvsspring Posted May 14, 2007 Share Posted May 14, 2007 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>'; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/51350-max-rows-cannot-add-more-to-my-database/ Share on other sites More sharing options...
kenrbnsn Posted May 14, 2007 Share Posted May 14, 2007 Please post the exact error you're receiving. The code you posted doesn't do any inserting or updating, so I'm not sure what you are asking. Ken Quote Link to comment https://forums.phpfreaks.com/topic/51350-max-rows-cannot-add-more-to-my-database/#findComment-252870 Share on other sites More sharing options...
trvsspring Posted May 14, 2007 Author Share Posted May 14, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/51350-max-rows-cannot-add-more-to-my-database/#findComment-252886 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.