473,561 Members | 3,644 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to increment character value

3 New Member
Sorry guys just wanted to learn. I have a database. When I do the search using mysql suppose i have 100 records I wanted to keep the first second ... in the loop to be retrain.
like an integer you may use $count = $count + 1;
then in the second round count value would be 2.
In this case I wanted the character to retain the old value incrementally
ex. first loop. kind = a
second. kind = a , b
3rd. kind = a , b c and so on

thanks. I need your help. thanks a lot
Dec 17 '06 #1
3 9106
83 New Member
I for one don't understand what you are talking about. Maybe it is because English isn't my first lanuage...

You may want to try talking Perl instead of English, i.e. show us the code you have prepared in an attempt to do whatever you are trying to do.
Dec 17 '06 #2
3 New Member
I for one don't understand what you are talking about. Maybe it is because English isn't my first lanuage...

You may want to try talking Perl instead of English, i.e. show us the code you have prepared in an attempt to do whatever you are trying to do.

$dbh = DBI->connect('dbi:m ysql:dbname,use r, pass);
#prepare and execute SQL statement
$sqlstatement=" SELECT reg_id, category_id, category_name FROM table1 where category_id = \'$category_id\ ' ";
$sth = $dbh->prepare($sqlst atement);
$sth->execute ||
die "Could not execute SQL statement ... maybe invalid?";

print "<table border = 0>";
print "<td><p align=\"center\ "><b>Reg ID</b></td>";
print "<td><p align=\"center\ "><b>Catego ry ID</b></td>";
print "<td><p align=\"center\ "><b>Catego ry Name</b></td>";
print "<tr>";
#output database results
while (@row=$sth->fetchrow_array )

my $query = "UPDATE table2 set category_name = \"$row[2]\" where reg_id = \"$row[0]\" ";


table1 having 100 records
the category_name under table2 are empty I wanted to fill this empty column with the value table1 under category_name would be placed using the condition of reg_id both table have same common entry.

Dec 17 '06 #3
88 New Member
Do you mean something like this???

Expand|Select|Wrap|Line Numbers
  1. for ( $i=26, $c='a' ; $i ; $i--, $c=chr(ord($c)+1) ) { printf("$c\n"); }
Greetz, Doc
Dec 19 '06 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

by: lovecreatesbeauty | last post by:
Hello experts, Why can this difference between prefix increment/decrement and postfix increment/decrement reside in built-in operators for built-in data types? Thanks. // test.cpp // // >g++ test.cpp // test.cpp: In function `int main()':
by: jrefactors | last post by:
I heard people saying prefix increment is faster than postfix incerement, but I don't know what's the difference. They both are i = i+1. i++ ++i Please advise. thanks!!
by: Mansi | last post by:
Given the following declaration: char letter = 'A'; Is there a way that I can increment letter so that 'B' is returned? Thanks. Mansi
by: pai | last post by:
hi.. I have a simple doubt about increment operators.. Can any one tell me what is really happening.. Eg: int i=0,ans; ( ans = ++i ++i // This
by: Stuart | last post by:
Hi all, Iv'e got a page that has a mass amount of input fields, all of which require a decimal figure. To make it easier when it comes to inputting data, I'm trying to setup + and - links that will increment/decrement the form field value by 1 when clicked. I'm using the following code, however when I click on one of the links, I get the...
by: john | last post by:
Is it true that if I split my access database in backend and frontend and I implement custom auto increment for the ID fields, that my database is ready to be used in a multi-user environment? I found a zillion messages about auto increment and read some of them but it's confusing. Can someone point me to a simple custom auto increment example...
by: mohsin | last post by:
hi everyone well i m little bit confused about the use of pre an post increment infact my thinking contradict with the logic of programe lets consider an example x=5; y=x++; z=x; after the execution of these statments value of y will b 5 while value of z will be 6 WHY? value of x++ and x=x+1is equal it first assign a value of x to y then...
by: divya_rathore_ | last post by:
The code: int aaa = 100; printf("%d %d %d\n", --aaa, aaa, aaa--); printf("%d\n", aaa); prints: 99 100 100 98
by: jehugaleahsa | last post by:
Hello: In C++, you had to distinguish between post and pre increments when overloading. Could someone give me a short demonstration of how to write these? I get the impression that are handled with the same overload, but I just want to make sure.
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
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...
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...
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...
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...
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...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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

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.