473,396 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Database row automically changed when i closed that table and reopened it!

Hai to all,

i created a table in MYSql Database...

And i have added 15 rows in it....

like the following..

asd,
dff,
dfds,
hgh,
...
...
...
...

aaa(15th row)

when i saved that table, closed and reopened it,
the last row(15th) ie the aaa row automatically
changed to the 5th row...
like the following...
asd,
dff,
dfds,
hgh,
aaa,
...
...
...

And the other rows are comes correctly in the order given by me...

i think i want to change the database table properties to come correctly in
the order given by me....

Only the last row gives trouble to me...

since i'm a beginner to mysql i dont know how to do that....

Can any one tell me how to proceed for this?

thanks
senthil.
Dec 26 '06 #1
11 2045
bartonc
6,596 Expert 4TB
Hai to all,

i created a table in MYSql Database...

And i have added 15 rows in it....

like the following..

asd,
dff,
dfds,
hgh,
...
...
...
...

aaa(15th row)

when i saved that table, closed and reopened it,
the last row(15th) ie the aaa row automatically
changed to the 5th row...
like the following...
asd,
dff,
dfds,
hgh,
aaa,
...
...
...

And the other rows are comes correctly in the order given by me...

i think i want to change the database table properties to come correctly in
the order given by me....

Only the last row gives trouble to me...

since i'm a beginner to mysql i dont know how to do that....

Can any one tell me how to proceed for this?

thanks
senthil.
Please post the query that is giving you this behavior. Thanks.
Dec 26 '06 #2
Hai bartonc,

thanks for ur reply.....

[PHP]mysql_query(conn,"SELECT image FROM imagedb1"); [/PHP]

this is query i have used.

But that problem is not by query...

i think itz just database properties problem...

r u having any idea about this?

thanks
senthil
Dec 26 '06 #3
sashi
1,754 Expert 1GB
Hai bartonc,

thanks for ur reply.....

[PHP]mysql_query(conn,"SELECT image FROM imagedb1"); [/PHP]

this is query i have used.

But that problem is not by query...

i think itz just database properties problem...

r u having any idea about this?

thanks
senthil
Hi there,

What's the design layout of your table? Primary key? Identity column? Your SQL query seems to be fine, since it's return result set it means the syntax is just fine. I need more information on the table layout as it would ease in providing solution in return as well as to narrow down possibilities. Take care.
Dec 26 '06 #4
Hai shashi

thanks for ur reply..

my database is like this...

Expand|Select|Wrap|Line Numbers
  1. Name
  2. asd
  3. dff
  4. dfds
  5. hgh
  6. abc
  7. asadf
  8. asdf
this is a simple database i had created. And then i had saved that
database and closed...

when i reopened that database the last row that is the 6th row(asdf) changes its
location to the 5th row like the following...
Expand|Select|Wrap|Line Numbers
  1. Name
  2. asd
  3. dff
  4. dfds
  5. hgh
  6. abc
  7. asdf
  8. asadf
Not for this table row.... when i tried to create lot of rows...
saved, closed and when i reopened the table.... the last row
automatically changes to the 5th row...

i think the i want to check the table properties..

But i dont know..

do u know how to do that?

thanks..
senthil
Dec 26 '06 #5
sashi
1,754 Expert 1GB
Hai shashi

thanks for ur reply..

my database is like this...

Expand|Select|Wrap|Line Numbers
  1. Name
  2. asd
  3. dff
  4. dfds
  5. hgh
  6. abc
  7. asadf
  8. asdf
this is a simple database i had created. And then i had saved that
database and closed...

when i reopened that database the last row that is the 6th row(asdf) changes its
location to the 5th row like the following...
Expand|Select|Wrap|Line Numbers
  1. Name
  2. asd
  3. dff
  4. dfds
  5. hgh
  6. abc
  7. asdf
  8. asadf
Not for this table row.... when i tried to create lot of rows...
saved, closed and when i reopened the table.... the last row
automatically changes to the 5th row...

i think the i want to check the table properties..

But i dont know..

do u know how to do that?

thanks..
senthil
Hi there,

Just one field in your table? Name? No other fields?
Dec 26 '06 #6
ya only one field....

first i'm trying for this simple database...
tats y there is only one field
Dec 26 '06 #7
ronverdonk
4,258 Expert 4TB
MySQL (and that goes for most db engines) never gave you any documented guarantee that the order in which you store your rows (or the order of the columns) is the order by which you retrieve them. The contrary, the whole point of SQL is to abstract the application from the data storage. You should always specify the order in which you wish to retrieve your data.

Ronald :cool:
Dec 26 '06 #8
sashi
1,754 Expert 1GB
ya only one field....

first i'm trying for this simple database...
tats y there is only one field
Hi there,

Ronald's correct. You need to specify an order along with your query statement. Kindly refer to below sample query statement, hope it helps. Good luck & Take care.

Expand|Select|Wrap|Line Numbers
  1.   SELECT * FROM [TableName] ORDER BY [FieldName] ASC;
  2.  
Dec 28 '06 #9
Hai Sashi,

thanks for ur reply....

ur conditions used for me....

i'm working in the field of C++...

Do u know how to convert text data to xml data?

is there any source codes available in the net?

will u plzz help me?

thanks..
senthil
Dec 28 '06 #10
sashi
1,754 Expert 1GB
Hai Sashi,

thanks for ur reply....

ur conditions used for me....

i'm working in the field of C++...

Do u know how to convert text data to xml data?

is there any source codes available in the net?

will u plzz help me?

thanks..
senthil
Hi there,

C++ and me are million miles apart, i would suggest you asking this question in C++ from section, hope it helps. Good luck & Take care.
Dec 28 '06 #11
ya ok........

thanks for ur responses...

take care
bye
senthil
Dec 28 '06 #12

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

Similar topics

4
by: Gerwin Philippo | last post by:
We run a postgres database (7.4) with an MsAcces(2000) frontend, and since our last upgrade from 7.2 I have the following problem: When I try to edit a record in msacces with a high recordnummer,...
17
by: MLH | last post by:
The Microsoft Jt database engine can not find tblJobSites, error #3078. That's what I get when executing this code... Private Sub Command1_Click() Dim MyWorkspace As Workspace Set MyWorkspace...
11
by: MLH | last post by:
My alzheimer moments occur with greater frequency these days, it seems. I sometimes open Access and the same dbase in a second instance and work on items. If I modify a form and discover later...
2
by: Deano | last post by:
Hi, I have created a new form that reads in data from some intermediate tables. These intermediate tables are used to compile data for use in a report or the new form I have made. Having...
0
by: gm | last post by:
Immediately after generating the Access application from the Source Safe project I get: "-2147467259 Could not use ''; file already in use." If Access database closed and then reopened I get:...
3
by: rdraider | last post by:
Everything I read about sp_resetstatus says you must restart SQL after. Is there a way around that (don't want to shut down production). The suspect db is just an empty db that is not needed. I...
8
by: BD | last post by:
I am developing C# win form app to work with remote database on SQL Server 2005. Problem scenario is as follows: 1. a form is open that has downloaded dataset to local cache 2. computer is...
1
Curtis Rutland
by: Curtis Rutland | last post by:
How To Use A Database In Your Program Part II This article is intended to extend Frinny’s excellent article: How to Use a Database in Your Program. Frinny’s article defines the basic concepts...
4
by: Macadair | last post by:
Hi I have an Access XP database backend (data only) that is linked by VB code to a frontend application. While the application is still working correctly, linking and passing over data, when I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.