473,662 Members | 2,524 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem Displaying 10 rows of Different Categories

I'm having all kinds of visual problems using dreamweaver's built in
query builder. I have 4 different categories. Right.

I want to show ten records from each category of items in a mysql
database. All on the same page. Could someone tell me what is wrong
with my code?

The page is here
http://www.picmonkey.com/MoreGraphics.php

$currentPage = $_SERVER["PHP_SELF"];
$maxRows_ForBoy s = 10;
$pageNum_ForBoy s = 0;
if (isset($_GET['pageNum_ForBoy s'])) {
$pageNum_ForBoy s = $_GET['pageNum_ForBoy s'];
}
$startRow_ForBo ys = $pageNum_ForBoy s * $maxRows_ForBoy s;

mysql_select_db ($database_pigg ybank, $piggybank);
$query_ForBoys = "SELECT graphics.owner, graphics.Upload Date,
graphics.cat, graphics.locati on, graphics.auto FROM graphics
where `cat` = 'For Guys'";
$ForBoys = mysql_query($qu ery_ForBoys, $piggybank) or
die(mysql_error ());
$row_ForBoys = mysql_fetch_ass oc($ForBoys);
$totalRows_ForB oys = mysql_num_rows( $ForBoys);

if (isset($_GET['totalRows_ForB oys'])) {
$totalRows_ForB oys = $_GET['totalRows_ForB oys'];
} else {
$all_ForBoys = mysql_query($qu ery_ForBoys);
$totalRows_ForB oys = mysql_num_rows( $all_ForBoys);
}
$totalPages_For Boys = ceil($totalRows _ForBoys/$maxRows_ForBoy s)-1;

//2

$maxRows_ForGir ls = 10;
$pageNum_ForGir ls = 0;
if (isset($_GET['pageNum_ForGir ls'])) {
$pageNum_ForGir ls = $_GET['pageNum_ForGir ls'];
}
$startRow_ForGi rls = $pageNum_ForGir ls * $maxRows_ForGir ls;

mysql_select_db ($database_pigg ybank, $piggybank);
$query_ForGirls = "SELECT graphics.owner, graphics.Upload Date,
graphics.cat, graphics.locati on, graphics.auto FROM graphics where
`cat` = 'For Girls'";
$query_limit_Fo rGirls = sprintf("%s LIMIT %d, %d", $query_ForGirls ,
$startRow_ForGi rls, $maxRows_ForGir ls);
$ForGirls = mysql_query($qu ery_limit_ForGi rls, $piggybank) or
die(mysql_error ());
$row_ForGirls = mysql_fetch_ass oc($ForGirls);

if (isset($_GET['totalRows_ForG irls'])) {
$totalRows_ForG irls = $_GET['totalRows_ForG irls'];
} else {
$all_ForGirls = mysql_query($qu ery_ForGirls);
$totalRows_ForG irls = mysql_num_rows( $all_ForGirls);
}
$totalPages_For Girls = ceil($totalRows _ForGirls/$maxRows_ForGir ls)-1;

mysql_select_db ($database_pigg ybank, $piggybank);
$query_Animals = "SELECT graphics.owner, graphics.Upload Date,
graphics.cat, graphics.locati on, graphics.auto FROM graphics WHERE
`cat` = 'Animals'";
$Animals = mysql_query($qu ery_Animals, $piggybank) or
die(mysql_error ());
$row_Animals = mysql_fetch_ass oc($Animals);
$totalRows_Anim als = mysql_num_rows( $Animals);

mysql_select_db ($database_pigg ybank, $piggybank);
$query_Cartoons = "SELECT graphics.owner, graphics.Upload Date,
graphics.cat, graphics.locati on, graphics.auto FROM graphics WHERE
`cat` = 'Cartoons'";
$Cartoons = mysql_query($qu ery_Cartoons, $piggybank) or
die(mysql_error ());
$row_Cartoons = mysql_fetch_ass oc($Cartoons);
$totalRows_Cart oons = mysql_num_rows( $Cartoons);

$queryString_Fo rGirls = "";
if (!empty($_SERVE R['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param , "pageNum_ForGir ls") == false &&
stristr($param, "totalRows_ForG irls") == false) {
array_push($new Params, $param);
}
}
if (count($newPara ms) != 0) {
$queryString_Fo rGirls = "&" . htmlentities(im plode("&",
$newParams));
}
}
$queryString_Fo rGirls = sprintf("&total Rows_ForGirls=% d%s",
$totalRows_ForG irls, $queryString_Fo rGirls);

//column 3

$maxRows_Glitte r = 10;
$pageNum_Glitte r = 0;
if (isset($_GET['pageNum_Glitte r'])) {
$pageNum_Glitte r = $_GET['pageNum_Glitte r'];
}
$startRow_Glitt er = $pageNum_Glitte r * $maxRows_Glitte r;

mysql_select_db ($database_pigg ybank, $piggybank);
$query_Glitter = "SELECT graphics.owner, graphics.Upload Date,
graphics.cat, graphics.locati on, graphics.auto FROM graphics
where `cat` = 'Glitter'";
$Glitter = mysql_query($qu ery_Glitter, $piggybank) or
die(mysql_error ());
$row_Glitter = mysql_fetch_ass oc($Glitter);
$totalRows_Glit ter = mysql_num_rows( $Glitter);

if (isset($_GET['totalRows_Glit ter'])) {
$totalRows_Glit ter = $_GET['totalRows_Glit ter'];
} else {
$all_Glitter = mysql_query($qu ery_Glitter);
$totalRows_Glit ter = mysql_num_rows( $all_Glitter);
}
$totalPages_Gli tter = ceil($totalRows _Glitter/$maxRows_Glitte r)-1;
?>

<?php
$maxRows_Animal s = 10;
$pageNum_Animal s = 0;
if (isset($_GET['pageNum_Animal s'])) {
$pageNum_Animal s = $_GET['pageNum_Animal s'];
}
$startRow_Anima ls = $pageNum_Animal s * $maxRows_Animal s;

mysql_select_db ($database_pigg ybank, $piggybank);
$query_Animals = "SELECT graphics.owner, graphics.Upload Date,
graphics.cat, graphics.locati on, graphics.auto FROM graphics where
`cat` = 'For Girls'";
$query_limit_An imals = sprintf("%s LIMIT %d, %d", $query_Animals,
$startRow_Anima ls, $maxRows_Animal s);
$Animals = mysql_query($qu ery_limit_Anima ls, $piggybank) or
die(mysql_error ());
$row_Animals = mysql_fetch_ass oc($Animals);

if (isset($_GET['totalRows_Anim als'])) {
$totalRows_Anim als = $_GET['totalRows_Anim als'];
} else {
$all_Animals = mysql_query($qu ery_Animals);
$totalRows_Anim als = mysql_num_rows( $all_Animals);
}
$totalPages_Ani mals = ceil($totalRows _Animals/$maxRows_Animal s)-1;

mysql_select_db ($database_pigg ybank, $piggybank);
$query_Glitter = "SELECT graphics.owner, graphics.Upload Date,
graphics.cat, graphics.locati on, graphics.auto FROM graphics WHERE
`cat` = 'Glitter'";
$Glitter = mysql_query($qu ery_Glitter, $piggybank) or
die(mysql_error ());
$row_Glitter = mysql_fetch_ass oc($Glitter);
$totalRows_Glit ter = mysql_num_rows( $Glitter);
?>
<?php include('header .php'); ?>
<td colspan="3"><h1 ><a href="index.php ">Index</a> - Browse
Graphics</h1></td></table>

<div class="dotted" id="Layer1" style="position :absolute; width:383px;
height:153px; z-index:1; left: 470px; top: 112px; background-color:
#e4e9eb; layer-background-color: #e4e9eb;">

<script language="JavaS cript" type="text/javascript">
<!--
ctxt_ad_partner = "1066315875 ";
ctxt_ad_section = "29578";
ctxt_ad_bg = "";
ctxt_ad_width = 336;
ctxt_ad_height = 280;
ctxt_ad_bc = "e4e9eb";
ctxt_ad_cc = "e4e9eb";
ctxt_ad_lc = "543d25";
ctxt_ad_tc = "000000";
ctxt_ad_uc = "999999";
// -->
</script>
<script language="JavaS cript"
src="http://ypn-js.overture.com/partner/js/ypn.js">
</script>
<br>
<a href="http://www.mytuneslive .com"
target="_blank" >MyTunesLive.co m<br>
</a><br>
Play your MP3 Library from anywhere! You can create a profile, and put
a flash player in your myspace, friendster or other social site!
</div>

<?php do { ?><?php do { ?><?php do { ?><?php do { ?>

<table width="950" border="0" align="center">
<tr>
<td width="100"><di v align="center"> <a
href="http://www.picmonkey.c om/MyCode.php?mine =<?php echo
$row_ForGirls['auto']; ?>"><img src="<?php echo
$row_ForGirls['location']; ?>" width="100" align="middle"
border="0"></a></div> </td>
<td width="100"><di v align="center"> <a
href="http://www.picmonkey.c om/MyCode.php?mine =<?php echo
$row_ForBoys['auto']; ?>"><img src="<?php echo
$row_ForBoys['location']; ?>" width="100" align="middle"
border="0"></div></td>
<td width="100"><di v align="center"> <a
href="http://www.picmonkey.c om/MyCode.php?mine =<?php echo
$row_Animals['auto']; ?>"><img src="<?php echo
$row_Animals['location']; ?>" width="100" align="middle"
border="0"></div></td>
<td width="387"></td>
<td colspan="2"><di v align="center"> <a
href="http://www.picmonkey.c om/MyCode.php?mine =<?php echo
$row_Glitter['auto']; ?>"><img src="<?php echo
$row_Glitter['location']; ?>" width="150" align="middle"
border="0"></div></td>
</tr>
<tr>
<td></td>
<td></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td width="1">&nbsp ;</td>
<td width="236">&nb sp;</td>
</tr>
</table>
<?php } while ($row_ForGirls = mysql_fetch_ass oc($ForGirls)); ?>
<?php } while ($row_ForBoys = mysql_fetch_ass oc($ForBoys)); ?>
<?php } while ($row_Animals = mysql_fetch_ass oc($Animals)); ?>
<?php } while ($row_Glitter = mysql_fetch_ass oc($Glitter)); ?>
<table width="950" border="0" align="center">
<tr>
<td width="100"><di v align="right">< a href="<?php
printf("%s?page Num_ForGirls=%d %s", $currentPage,
min($totalPages _ForGirls, $pageNum_ForGir ls + 1),
$queryString_Fo rGirls); ?>">View More </a></div></td>
<td width="100"><di v align="right">< a href="<?php
printf("%s?page Num_ForBoys=%d% s", $currentPage,
min($totalPages _ForBoys, $pageNum_ForBoy s + 1), $queryString_Fo rBoys);
?>">View More</a></div></td>
<td width="185">&nb sp;</td>
<td width="133">&nb sp;</td>
<td width="240"><di v align="right">< a href="<?php
printf("%s?page Num_Glitter=%d% s", $currentPage,
min($totalPages _Glitter, $pageNum_Glitte r + 1), $queryString_Gl itter);
?>">View More</a></div></td>
</tr>
<tr>
<td width="100">&nb sp;</td>
<td width="100">&nb sp;</td>
<td width="185">&nb sp;</td>
<td width="133">&nb sp;</td>
<td width="240">&nb sp;</td>
</tr>
</table>

Mar 27 '06 #1
2 1456
I meant 3 or 4 rows! Same Table, different value in `cat` field

Mar 27 '06 #2
ameshkin wrote:
I'm having all kinds of visual problems using dreamweaver's built in
query builder. I have 4 different categories. Right.

I want to show ten records from each category of items in a mysql
database. All on the same page. Could someone tell me what is wrong
with my code?

The page is here
http://www.picmonkey.com/MoreGraphics.php

$currentPage = $_SERVER["PHP_SELF"];
$maxRows_ForBoy s = 10;
$pageNum_ForBoy s = 0;
if (isset($_GET['pageNum_ForBoy s'])) {
$pageNum_ForBoy s = $_GET['pageNum_ForBoy s'];
}
$startRow_ForBo ys = $pageNum_ForBoy s * $maxRows_ForBoy s;

mysql_select_db ($database_pigg ybank, $piggybank);
$query_ForBoys = "SELECT graphics.owner, graphics.Upload Date,
graphics.cat, graphics.locati on, graphics.auto FROM graphics
where `cat` = 'For Guys'";
$ForBoys = mysql_query($qu ery_ForBoys, $piggybank) or
die(mysql_error ());
$row_ForBoys = mysql_fetch_ass oc($ForBoys);
$totalRows_ForB oys = mysql_num_rows( $ForBoys);

if (isset($_GET['totalRows_ForB oys'])) {
$totalRows_ForB oys = $_GET['totalRows_ForB oys'];
} else {
$all_ForBoys = mysql_query($qu ery_ForBoys);
$totalRows_ForB oys = mysql_num_rows( $all_ForBoys);
}
$totalPages_For Boys = ceil($totalRows _ForBoys/$maxRows_ForBoy s)-1;

//2

$maxRows_ForGir ls = 10;
$pageNum_ForGir ls = 0;
if (isset($_GET['pageNum_ForGir ls'])) {
$pageNum_ForGir ls = $_GET['pageNum_ForGir ls'];
}
$startRow_ForGi rls = $pageNum_ForGir ls * $maxRows_ForGir ls;

mysql_select_db ($database_pigg ybank, $piggybank);
$query_ForGirls = "SELECT graphics.owner, graphics.Upload Date,
graphics.cat, graphics.locati on, graphics.auto FROM graphics where
`cat` = 'For Girls'";
$query_limit_Fo rGirls = sprintf("%s LIMIT %d, %d", $query_ForGirls ,
$startRow_ForGi rls, $maxRows_ForGir ls);
$ForGirls = mysql_query($qu ery_limit_ForGi rls, $piggybank) or
die(mysql_error ());
$row_ForGirls = mysql_fetch_ass oc($ForGirls);

if (isset($_GET['totalRows_ForG irls'])) {
$totalRows_ForG irls = $_GET['totalRows_ForG irls'];
} else {
$all_ForGirls = mysql_query($qu ery_ForGirls);
$totalRows_ForG irls = mysql_num_rows( $all_ForGirls);
}
$totalPages_For Girls = ceil($totalRows _ForGirls/$maxRows_ForGir ls)-1;

mysql_select_db ($database_pigg ybank, $piggybank);
$query_Animals = "SELECT graphics.owner, graphics.Upload Date,
graphics.cat, graphics.locati on, graphics.auto FROM graphics WHERE
`cat` = 'Animals'";
$Animals = mysql_query($qu ery_Animals, $piggybank) or
die(mysql_error ());
$row_Animals = mysql_fetch_ass oc($Animals);
$totalRows_Anim als = mysql_num_rows( $Animals);

mysql_select_db ($database_pigg ybank, $piggybank);
$query_Cartoons = "SELECT graphics.owner, graphics.Upload Date,
graphics.cat, graphics.locati on, graphics.auto FROM graphics WHERE
`cat` = 'Cartoons'";
$Cartoons = mysql_query($qu ery_Cartoons, $piggybank) or
die(mysql_error ());
$row_Cartoons = mysql_fetch_ass oc($Cartoons);
$totalRows_Cart oons = mysql_num_rows( $Cartoons);

$queryString_Fo rGirls = "";
if (!empty($_SERVE R['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param , "pageNum_ForGir ls") == false &&
stristr($param, "totalRows_ForG irls") == false) {
array_push($new Params, $param);
}
}
if (count($newPara ms) != 0) {
$queryString_Fo rGirls = "&" . htmlentities(im plode("&",
$newParams));
}
}
$queryString_Fo rGirls = sprintf("&total Rows_ForGirls=% d%s",
$totalRows_ForG irls, $queryString_Fo rGirls);

//column 3

$maxRows_Glitte r = 10;
$pageNum_Glitte r = 0;
if (isset($_GET['pageNum_Glitte r'])) {
$pageNum_Glitte r = $_GET['pageNum_Glitte r'];
}
$startRow_Glitt er = $pageNum_Glitte r * $maxRows_Glitte r;

mysql_select_db ($database_pigg ybank, $piggybank);
$query_Glitter = "SELECT graphics.owner, graphics.Upload Date,
graphics.cat, graphics.locati on, graphics.auto FROM graphics
where `cat` = 'Glitter'";
$Glitter = mysql_query($qu ery_Glitter, $piggybank) or
die(mysql_error ());
$row_Glitter = mysql_fetch_ass oc($Glitter);
$totalRows_Glit ter = mysql_num_rows( $Glitter);

if (isset($_GET['totalRows_Glit ter'])) {
$totalRows_Glit ter = $_GET['totalRows_Glit ter'];
} else {
$all_Glitter = mysql_query($qu ery_Glitter);
$totalRows_Glit ter = mysql_num_rows( $all_Glitter);
}
$totalPages_Gli tter = ceil($totalRows _Glitter/$maxRows_Glitte r)-1;
?>

<?php
$maxRows_Animal s = 10;
$pageNum_Animal s = 0;
if (isset($_GET['pageNum_Animal s'])) {
$pageNum_Animal s = $_GET['pageNum_Animal s'];
}
$startRow_Anima ls = $pageNum_Animal s * $maxRows_Animal s;

mysql_select_db ($database_pigg ybank, $piggybank);
$query_Animals = "SELECT graphics.owner, graphics.Upload Date,
graphics.cat, graphics.locati on, graphics.auto FROM graphics where
`cat` = 'For Girls'";
$query_limit_An imals = sprintf("%s LIMIT %d, %d", $query_Animals,
$startRow_Anima ls, $maxRows_Animal s);
$Animals = mysql_query($qu ery_limit_Anima ls, $piggybank) or
die(mysql_error ());
$row_Animals = mysql_fetch_ass oc($Animals);

if (isset($_GET['totalRows_Anim als'])) {
$totalRows_Anim als = $_GET['totalRows_Anim als'];
} else {
$all_Animals = mysql_query($qu ery_Animals);
$totalRows_Anim als = mysql_num_rows( $all_Animals);
}
$totalPages_Ani mals = ceil($totalRows _Animals/$maxRows_Animal s)-1;

mysql_select_db ($database_pigg ybank, $piggybank);
$query_Glitter = "SELECT graphics.owner, graphics.Upload Date,
graphics.cat, graphics.locati on, graphics.auto FROM graphics WHERE
`cat` = 'Glitter'";
$Glitter = mysql_query($qu ery_Glitter, $piggybank) or
die(mysql_error ());
$row_Glitter = mysql_fetch_ass oc($Glitter);
$totalRows_Glit ter = mysql_num_rows( $Glitter);
?>
<?php include('header .php'); ?>
<td colspan="3"><h1 ><a href="index.php ">Index</a> - Browse
Graphics</h1></td></table>

<div class="dotted" id="Layer1" style="position :absolute; width:383px;
height:153px; z-index:1; left: 470px; top: 112px; background-color:
#e4e9eb; layer-background-color: #e4e9eb;">

<script language="JavaS cript" type="text/javascript">
<!--
ctxt_ad_partner = "1066315875 ";
ctxt_ad_section = "29578";
ctxt_ad_bg = "";
ctxt_ad_width = 336;
ctxt_ad_height = 280;
ctxt_ad_bc = "e4e9eb";
ctxt_ad_cc = "e4e9eb";
ctxt_ad_lc = "543d25";
ctxt_ad_tc = "000000";
ctxt_ad_uc = "999999";
// -->
</script>
<script language="JavaS cript"
src="http://ypn-js.overture.com/partner/js/ypn.js">
</script>
<br>
<a href="http://www.mytuneslive .com"
target="_blank" >MyTunesLive.co m<br>
</a><br>
Play your MP3 Library from anywhere! You can create a profile, and put
a flash player in your myspace, friendster or other social site!
</div>

<?php do { ?><?php do { ?><?php do { ?><?php do { ?>

<table width="950" border="0" align="center">
<tr>
<td width="100"><di v align="center"> <a
href="http://www.picmonkey.c om/MyCode.php?mine =<?php echo
$row_ForGirls['auto']; ?>"><img src="<?php echo
$row_ForGirls['location']; ?>" width="100" align="middle"
border="0"></a></div> </td>
<td width="100"><di v align="center"> <a
href="http://www.picmonkey.c om/MyCode.php?mine =<?php echo
$row_ForBoys['auto']; ?>"><img src="<?php echo
$row_ForBoys['location']; ?>" width="100" align="middle"
border="0"></div></td>
<td width="100"><di v align="center"> <a
href="http://www.picmonkey.c om/MyCode.php?mine =<?php echo
$row_Animals['auto']; ?>"><img src="<?php echo
$row_Animals['location']; ?>" width="100" align="middle"
border="0"></div></td>
<td width="387"></td>
<td colspan="2"><di v align="center"> <a
href="http://www.picmonkey.c om/MyCode.php?mine =<?php echo
$row_Glitter['auto']; ?>"><img src="<?php echo
$row_Glitter['location']; ?>" width="150" align="middle"
border="0"></div></td>
</tr>
<tr>
<td></td>
<td></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td width="1">&nbsp ;</td>
<td width="236">&nb sp;</td>
</tr>
</table>
<?php } while ($row_ForGirls = mysql_fetch_ass oc($ForGirls)); ?>
<?php } while ($row_ForBoys = mysql_fetch_ass oc($ForBoys)); ?>
<?php } while ($row_Animals = mysql_fetch_ass oc($Animals)); ?>
<?php } while ($row_Glitter = mysql_fetch_ass oc($Glitter)); ?>
<table width="950" border="0" align="center">
<tr>
<td width="100"><di v align="right">< a href="<?php
printf("%s?page Num_ForGirls=%d %s", $currentPage,
min($totalPages _ForGirls, $pageNum_ForGir ls + 1),
$queryString_Fo rGirls); ?>">View More </a></div></td>
<td width="100"><di v align="right">< a href="<?php
printf("%s?page Num_ForBoys=%d% s", $currentPage,
min($totalPages _ForBoys, $pageNum_ForBoy s + 1), $queryString_Fo rBoys);
?>">View More</a></div></td>
<td width="185">&nb sp;</td>
<td width="133">&nb sp;</td>
<td width="240"><di v align="right">< a href="<?php
printf("%s?page Num_Glitter=%d% s", $currentPage,
min($totalPages _Glitter, $pageNum_Glitte r + 1), $queryString_Gl itter);
?>">View More</a></div></td>
</tr>
<tr>
<td width="100">&nb sp;</td>
<td width="100">&nb sp;</td>
<td width="185">&nb sp;</td>
<td width="133">&nb sp;</td>
<td width="240">&nb sp;</td>
</tr>
</table>

Without going through all of your code, what are you actually getting? And what
do you expect to get that's different?

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===
Mar 29 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
968
by: Shaun | last post by:
What I am trying to do is select all the rows out of the categories table (see below) and select the sum of j_amount out of the judgment table. Right now it is only returning the categories that are in the judgment table. I want it to return those fields with the amounts out of the judgment table, but also the all the other categories from the categories table with 0 as there amount. Does anyone have a suggestion. select...
0
1724
by: Fronky | last post by:
Hope someone can help. I am still learning, so no laughing please. I am displaying records from a database using Response.Write(""); instead of the usual datagrid method. I am doing it this way to achieve the result I require. However. Since I have added a button to the screen, and have had to include the "object sender, System.EventArgs e", the Response.Write code has been appearing within the Documents_Table(null,null); tag on the...
0
1202
by: Manuel | last post by:
If I have 2 tables CATEGORIES and PRODUCTS. What's the most "elegant" way (in programming terms) of displaying all the Categories with it's Products on a web page? I would like to show a list or table like: -Cat1 -----Product1 -----Product2 -----Product3
3
1350
by: Bill Nguyen | last post by:
I found that rows in datagrid can be sorted by clicking on the column header. However, this doesn't refresh the .currentindex DataGrid1.CurrentCell.RowNumber I need either to disable colum sorting programmatcially or somehow refresh the DataGrid1.CurrentCell.RowNumber index so that it will reflect the correct rownumber.
7
9774
by: Jon Maz | last post by:
Hi, I have a MySql problem I hope someone can help me with. I'm trying to run an update on a linking table, the update is running into a Primary Key constraint violation, and in my workaround I've got stuck trying to write a DELETE statement. Here's the table I'm working on: CREATE TABLE `articles_categories` (
8
1825
by: Mark | last post by:
Let's say I have a table of users, and each user has a list of categories. I could store each user's categories as TEXT with delimeters like "cat1|cat2|cat3" But then I need to be able to get a full list of everyone's categories, without duplicates. Retrieving all the categories, exploding them, and then removing the duplicates is a bit slow. Is there a better method?
13
3868
by: hornedw | last post by:
I have been working on a ecommerce website for myself. What I needed some assistance on was when i was trying to display the categories/subcategories for the different products. I decided to use the modified preorder tree transversal algorithm. What I wanted was on the first page is to display the catogories as follows Books (35) Electronics(23) The number inside the parenthesis being the number of products in that
1
3058
by: dhyder | last post by:
OK, like the title says my error is Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. I have looked into this a lot, but have not been able to find a solution to it. <%@ Page Language="c#" runat="server" debug="true" %> <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Data.OleDb" %> <script runat="server"> OleDbConnection conn = new...
0
1228
by: Jeff | last post by:
hi there ;) asp.net 2.0 I'm having problem with paging in GridView, I'm using custom paging. The ObjectDataSource reads in the rows needed for displaying each page as each page is selected. So that the entire resultset isn't read, but instead just enough to display the pages. The problem now is that the GridView is only displaying the 2 rows, The
0
8344
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8764
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5654
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1993
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.