How to strart auto_increment from 500000? (mysql)
Hi all,
quick question, I have a table with the following prop:
1. ID
2. fname
3. lname
the Id is auto_increment. I wonder how can I start the count from say 50000?
thank you
thank you
ALTER TABLE tbl AUTO_INCREMENT = 100;
solved!
Similar Messages
-
How to query data from Oracle, MySQL, and MSSQL?
For an environment consisting of Oracle 11g/12c enterprise edition, MySQL 5.7 community edition, and MSSQL 2008/2012 stanard/enterprise edition, is there any major issue using DG4ODBC to query data from all 3 platforms?
Is there other free alternatives?
If the queried data is mostly contained in MySQL or MSSQL, will it be more efficient to query from MySQL or MSSQL?
If yes, any suggestion of how to do it in those platforms? I know MSSQL can use linked server but it is quite slow.mkirtley-Oracle wrote:
Hi Ed,
It is semantics. By multiple instances I mean you have the gateway installed in an ORACLE_HOME which has 1 listener. However, if you are connecting to different non-Oracle databases or different individual databases of that non-Oracle database then you need multiple gateway instances for each database being connected. I did not mean that you need a gateway installed in a separate ORACLE_HOME for each non-Oracle database to which you are connecting.
Each of these would have a separate instance file within that ORACLE_HOME/hs/admin directory with the connection details for the non-Oracle database to which that instance connects.. So, you would have -
initgtw1.ora - connects to MySQL
initgtw2.ora - connect to SQL*Server northwind database
initgtw3.ora - connect to SQL*Server test database
etc
etc
Each of these instances would have a separate entry in the gateway listener.ora.
In MOS have a look at this note -
How To Add A New Database or Destination To An Existing Gateway Configuration (Doc ID 1304573.1)
Regards,
Mike
Ah yes, we are in agreement, it was just semantics. Thanks. -
How to fill table from datatable(MySQL)
hi;
I am starting with Visual web java server faces, and I want to fill a Table using an information from MySQL data base, i am trying to modify a example code I have found on netbeans totorials but they are using droplist and I want firts to use a texfield to set a "name" and button to search using a MySQL query to seek on data table and get the return and set it to Table.
Basicly I dont Know HOW to connect a data base using same code like a desktop application but in Visual Web Java Server Faces.
thank you in advance.
Miguel V.Hi;
I hava done this code but still geting a mistake with tomcat
Next steps i follow to conectand display on data table:
1.-Create conecction with MySQL usen service.
2.-On service drag "directorio" to Table
3.-Binding all objets (Textfield1, Table and Button)
4.-On button1 create the next code:
Object optener =3;
//set the dataprovider with element number 3, on DIRECTORIO.ID of datatable directorio
directorioDataProvider.setCursorRow(directorioDataProvider.findFirst("DIRECTORIO.ID", optener));
//Get the row with same ID=3
getSessionBean1().getDirectorioRowSet().setObject(1, optener);
//Shows the inf on table
getSessionBean1().getDirectorioRowSet().execute();
directorioDataProvider.refresh(); -
How to remove/delete from a mysql table
Hello!
Please can someone help me with this one; I need to remove/delete a a row in a mysql table. When I use the query below, it removes this line from other tables containing the same numbers too. I only want to remove it from this table alone
String update= ("DELETE FROM info WHERE Number = '" + Nr + "' AND week= " + week+ ");
THXI don't understand this. You're saying that running this query removes values from other tables besides your info table? I don't believe it.
One thing I'd caution you on is using names like "info" and "number" for tables and columns. They sound suspiciously close to keywords for your database. You'd be better off using less generic, more application specific names.
But I don't think that explains the behavior you're describing. Either this is a very serious bug in MySQL or a very serious misunderstanding on your part. -
How to retrive data from MYSQL database beginner question
I need to know a method, on how to retrieve values from a MYSQL database. I finally managed to insert data to a MySql database using hibernate, with the help of google. but, i couldn't find any helpful article on google, on retrieving data, will some plzz help me, by directing me to a site that has sample codes ??
i am actually new to MYSql and Databases in java, so plzz do help me, i am lost here,,, :(Oh, it's Hibernate. In the future, please use the forums at their own site.
Answers on how to use Hibernate are usually available in the excellent "Hibernate Reference Documentation" available here. -
How to fetch data from Mysql with SSL.
I am using jdk1.5 and mysql 5.0.
How to fetch data from Mysql with SSL
I am using url = jdbc:mysql://localhost/database?useSSL=true&requireSSL=true.
It shows error. how to fetchI have created certificate in mysql and checked in mysql.
mysql>\s
SSL: Cipher in use is DHE-RSA-AES256-SHA
but through ssl how to fetch data in java. -
How to populate a Table from a WebApplication JSF from a MySQL database
Hi,
I'm trying to populate a table on a WebApplication JSF. I don't know how the table can be filled with informations from a MySQL database.
Please show me the way.In the future, JSF related questions should be posted in a forum devoted to JSF: [http://forums.sun.com/forum.jspa?forumID=427].
Regarding to your question, you may find this article useful: [http://balusc.blogspot.com/2006/06/using-datatables.html]. -
How to insert data from JTable to mysql Table....
hello everybody
i need help about how to insert data from JTable to mysql table... i know about how to create Table model...facing problem about how to insert data from JTable to mysql table....any helping link or code ... ill be thankfulll....for giving me solution...table1.getValueAt(table1.getSelectedRow(),0)you are getting the value of a selected row... or if you want you can just use a loop..
for(.....){
table1.getValueAt(x,y);
}I think you know INSERT STATEMENT.. here on it just string concat
sample e.g. (This not insert)
"delete from accrule " +
"where ruleid= " + tblRA.getValueAt(tblRA.getSelectedRow(),0)+
" and accountname='"+tblRA.getValueAt(tblRA.getSelectedRow(),1)+"'" -
How to migrate database from oracle10g to mysql
how to migrate database from oracle10g to mysql
Assuming you're actually using any of the features of Oracle at present, this will be an impossible task, since MySql has such narrower set of supported SQL.
-
How to get data into the mySQL database?
First some background.
I have a website that has outgrown its designed dimensions and is a huge burden to maintain. See PPBM5 Benchmark
There is a lot of maintenance work involved, so I'm investigating a PHP/MySQL approach to easen the burden and to add functionality to the site. With the current Excel based structure and over 420 entries, it is cumbersome for me to maintain, but also for users to find what they need.
A MySQL based dynamic structure is a lot easier and offers vastly more selection capabilities, like selecting only records that meet specific criteria.
Data submission is done with a form, that contains most of the relevant data, but the drawack is that people submitting their data are often not technically inclined, give wrong answers due to a lack of understanding or making typo's. The test results are attached in one or two separate .txt files, but often they have not read the instructions correctly or did something wrong, so these attached .txt files can not be trusted automatically, they have to be checked before inclusion.
These were my initial thoughts:
1. Data collection:
To avoid spending all our energy and time on correcting typo's, getting missing data, correcting errors, I am investigating the use of CPU-Z in Ghost mode to create a .txt or .html file that contains all relevant hardware info we need and even more. It gives all the info we currently have, but adds data like number of memory sticks, DDR timings, stock clock speed and BCLK setting, video card info and VRAM size, etc.
To see what I mean, run CPU-Z, go to the About tab and press the Save Report button and look at the results.
This can all be done without user intervention in an automatic way, but maybe I need to add an Auto-It file to the test to make it all run as desired.
If this works and I'm able to extract the relevant data from the created file and can insert it into the database, we may be in business for the next version of PPBM5.5 or PPBM6. It does require a modification to the instructions, making them a lot easier, because there is less data to fill out.
2. Data submission:
The submission form can be simplified if the CPU-Z data can be used. We have to create an automatic way to attach the created .html file from CPU-Z to the submission form and we have to streamline the Output.txt and Output-MPE.txt files to be more easily included in the 'form.lib.php' file. It currently is manual labor and very time consuming.
3. Adding to Database:
I have to find a way to create database records from the Gmail forms I receive. All incoming mail messages need to be checked on relevancy and if relevant, need to be added automatically to the database and then offered for approval before final inclusion in the database. Data included in the database will then include submission date and time, Email address, IP address used, plus links to the files submitted and available on the website.
4. Publication of the database:
After approval of new records from step 3, all updates will be automatically applied to the database and accessible for users. I do not yet intend to introduce a user account , requesting login before all functionality is accessible. Too much trouble and administration.
Queries should be possible on things like CPU (check box), so include 17-920, i7-930, i7-950 but exclude i7-980X and i7-990X, Size of memory (check box), Overclocked (boolean, yes, no), SSD as OS disk, and similar options.
The biggest problem is to keep the color grading and statistical indicators (Top, D9, Q3, Med, Q1 and D1) intact on dynamically generated queries. Say you make a query which results in 20 observations, this should show the related colors and legends. Next query results in 48 observations and of course the color grading and legends do need to reflect that. Question in my mind, does the RPI remain constant, independent of the query or does that need to be recalculated on the basis of the query?
Next thing is to allow a user to select a specific observation and by simply clicking on it be shown, in a separate window (detail page) or accordion, all the CPU-Z related information about the hardware.
The graphs, Top-20 and MPE Gains, need to be dynamically adjusted, based on the query used.
5. Ideally, external links:
In an ideal situation, one could link the CPU-Z data to external price databases, looking up current prices for CPU, memory, video card, disks, raid controller, etc. to get instant BFTB charts, based on the query made. But that is the next step.
Situation now:
I have a MySQL database that is easily updated with the new submissions. Simply create a .CSV flie from the submitted forms and import that into the database. The bulk of the initial work is done.Lots remain to be done as you can see above, but that is for a later time.
Question:
I have this table, that needs to be filled with data in the submitted and attached files. Mr. X submitted his data and can be uniquely identified by his "Ref_ID". He attached one or two files in .TXT format with the relevant test data. These files are stored on the server with a concatenated name:
"Ref_ID","-","filename"
Say his Ref-ID is: 20110204-6cf5 and his submitted file is called: Output(99).txt then the file can be found on the server as
20110204-6cf5-Output(99).txt
I need to be able to open that comma delimited file, the contents may look like this: "439","1036","819","531" and insert these contents into the relevant record and fields.
Graphically,
is what I want to achieve.
This being my first exposure to PHP/MySQL, you can imagine I'm not clear on how to go from here.
Added complication is that I actually have 5 numbers to insert per record and two calculated fields, Total Score and RPI should be calculated fields. Haven't yet figured out how to handle calculated fields, maybe only in the PHP/HTML code and not in the database.
I hope someone can help me.You do have a very complex looking site and may need several tables in mysql to handle all that data. If you knew to phpmysql I would suggest taking a look at this tutorial it will help get you started in understanding how to $_GET info from a database and also how to $_POST data to a database. I am no expert just learning myself and I found this very helpful. This is the link http://www.adobe.com/devnet/dreamweaver/articles/first_dynamic_site_pt1.html
There are also many tutorials on Youtube to help build a CMS Content Management Site I would suggest the following: -
http://www.youtube.com/user/phpacademy
http://www.youtube.com/user/betterphp
http://www.youtube.com/user/flashbuilding
And many more on my channel here
http://www.youtube.com/user/Whisperingonthewind
CMS's are easier to maintain, add edit and delete content.
I have also recently bought a Book by David Powers Training from the Source very helpful.
Anyway hope you get it sorted. -
How to display data from a recordset based on data from another recordset
How to display data from a recordset based on data from
another recordset.
What I would like to do is as follows:
I have a fantasy hockey league website. For each team I have
a team page (clubhouse) which is generated using PHP/MySQL. The one
area I would like to clean up is the displaying of the divisional
standings on the right side. As of right now, I use a URL variable
(division = id2) to grab the needed data, which works ok. What I
want to do is clean up the url abit.
So far the url is
clubhouse.php?team=Wings&id=DET&id2=Pacific, in the end all
I want is clubhouse.php?team=Wings.
I have a separate table, that has the teams entire
information (full team name, short team, abbreviation, conference,
division, etc. so I was thinking if I could somehow do this:
Recordset Team Info is filtered using URL variable team
(short team). Based on what team equals, it would then insert this
variable into the Divisional Standings recordset.
So example: If I type in clubhouse.php?team=Wings, the Team
Info recordset would bring up the Pacific division. Then 'Pacific'
would be inserted into the Divisional Standings recordset to
display the Pacific Division Standings.
Basically I want this
SELECT *
FROM standings
WHERE division = <teaminfo.division>
ORDER BY pts DESC
Could someone help me, thank you.Assuming two tables- teamtable and standings:
teamtable - which has entire info about the team and has a
field called
"div" which has the division name say "pacific" and you want
to use this
name to get corresponding details from the other table.
standings - which has a field called "division" which you
want to use to
give the standings
SELECT * FROM standings AS st, teamtable AS t
WHERE st.division = t.div
ORDER BY pts DESC
Instead of * you could be specific on what fields you want to
select ..
something like
SELECT st.id AS id, st.position AS position, st.teamname AS
team
You cannot lose until you give up !!!
"Leburn98" <[email protected]> wrote in
message
news:[email protected]...
> How to display data from a recordset based on data from
another recordset.
>
> What I would like to do is as follows:
>
> I have a fantasy hockey league website. For each team I
have a team page
> (clubhouse) which is generated using PHP/MySQL. The one
area I would like
> to
> clean up is the displaying of the divisional standings
on the right side.
> As of
> right now, I use a URL variable (division = id2) to grab
the needed data,
> which
> works ok. What I want to do is clean up the url abit.
>
> So far the url is
clubhouse.php?team=Wings&id=DET&id2=Pacific, in the end
> all
> I want is clubhouse.php?team=Wings.
>
> I have a separate table, that has the teams entire
information (full team
> name, short team, abbreviation, conference, division,
etc. so I was
> thinking if
> I could somehow do this:
>
> Recordset Team Info is filtered using URL variable team
(short team).
> Based on
> what team equals, it would then insert this variable
into the Divisional
> Standings recordset.
>
> So example: If I type in clubhouse.php?team=Wings, the
Team Info recordset
> would bring up the Pacific division. Then 'Pacific'
would be inserted into
> the
> Divisional Standings recordset to display the Pacific
Division Standings.
>
> Basically I want this
>
> SELECT *
> FROM standings
> WHERE division = <teaminfo.division>
> ORDER BY pts DESC
>
> Could someone help me, thank you.
> -
How do I tell if a mysql update was successful?
How do I tell if a mysql update was successful?
I need to know if an update was run or if the record was not found.... is there some way that coldfusion can use that traps success/fail resoponses from mysql [linda like myquery.RecordCount ]?
basically I am trying to update a row, if no row was updated - the record must not exist so I then need to do an insert...
-any ideas?
-seanhere is the test query:
<cfquery name="qry" datasource="#application.dsn#">
update DISC_CUST set DISC_PriceChange = '222222', DISC_TaxablePriceChange = '2222222'
where DISC_ProdID = '1129'
</cfquery>
<cfdump var="#qry#" />
the error is "Variable QRY is undefined."
if you remove the dump the debug results for the query show:
Debugging Information
ColdFusion Server Enterprise
8,0,1,195765
Template
/Assets/Import/index.cfm
Time Stamp
19-Jul-10 02:19 PM
Locale
English (US)
User Agent
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4 ( .NET CLR 3.5.30729)
Remote IP
192.168.1.100
Host Name
192.168.1.100
Execution Time
Total Time
Avg Time
Count
Template
5 ms
5 ms
1
/data/vhome/xxxl/httpdocs/Assets/Import/index.cfm
3324 ms
STARTUP, PARSING, COMPILING, LOADING, & SHUTDOWN
3329 ms
TOTAL EXECUTION TIME
red = over 250 ms average execution time
SQL Queries qry (Datasource=dsn, Time=1ms, Records=0) in /data/vhome/xxx/httpdocs/Assets/Import/index.cfm @ 14:19:19.019
update DISC_CUST set DISC_PriceChange = '222222', DISC_TaxablePriceChange = '2222222'
where DISC_ProdID = '1129' -
How to delete data from single field in a database table?
Hi guys,
Plz suggest me How to delete data from single field in a database table?
thnks,
pavanhi
in addition to abv details..chk this:
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3aef358411d1829f0000e829fbfe/content.htm
http://dev.mysql.com/doc/maxdb/en/34/ee7fbd293911d3a97d00a0c9449261/content.htm
regards,
madhu -
*Urgent*How to insert data from MS SQL to the table that create at the adobe form?
Hi,
I'm using Adobe life cycle designer 8 to do my interactive form. I would like to ask how to insert data from MS SQL to the table that i have created in my adobe interactive form?
I really need the information ASAP as i need to hand in my project by next week... i really appreciate any one who reply this post.
ThanksTou need to do a couple of things
1. On the Essbase server, set up an odbc system connection to your MySQL database
2. In the load rule , go to the file menu and select open SQL data source and in the data source put in your SQL statement . A couple of hints. Where it says Select, don't put in the word select and where it say from don't put in from. The system adds them for you. The easiest way ti enter a SQL statement is to do it all in the select area So if your SQL would normanlly say select * from mytable just enter the code as * from mytable in the select area
The click ol/retrieve and enter in your connection info. Itshould bring data back into the load rule. Save the load rule and use it -
Making a jtable auto updates itself from a mysql table
Pretty much what the title says. How can i auto update the jtable for every time my mysql table is updated in anyway? i am implementing this auto update function in my admin program which displays a list of users who are online etc. from the moment a user is offline/online or changes other details displayed in my jtable, i want it to auto update the jtable as soon as the actual mysql table has been updated with new data...
I was thinking of re doing the whole jtable i made and create a thread for that table that has a infinite while loop that keeps repainting the jtable with the new updated data from a mysql table query eg select * from table and store the data into a resultset which then gets transferred into a vector. Load the vector into the jtbale and their ya go�.
what you think of this approach? Is their a better way to do this?
at the moment, as soon as my application opens, the jtable views all the data from my sql table, however if it doesnt auto updates itself, cheersi am implementing this auto update
function in my admin program which displays a list of
users who are online etc. from the moment a user is
offline/online or changes other details displayed in
my jtable, i want it to auto update the jtable as
soon as the actual mysql table has been updated with
new data...Well you can make some changes to make implementation easy
Ex: Create a table to keep a log of the changes in the system the dmin program read the log and replicate the changes as specified in the log on the table model.
When reading the log the admin program keep track of the sequence no of the last read log entry and it reads ony the entries which has larger seq numbers than the last read seq no
I dont think that it is critical to make this to be cloase to real time. An Update once a 1 or 2 secs should be sufficient.
Maybe you are looking for
-
Mail has stopped sending via exchange account after syncing with Mobile Me
Hi There, I'm having trouble tracking down the cause of this issue, but after resetting sync data on two macs (10.6.7) neither can send emails using our work account (iPad and iPhone seem fine). When I reply to emails for work (on a third-party hoste
-
Count the number of business partners on a non-cumulative key figure
Dear experts, I have a problem. We have an InfoCube in BW in which the Activity Journals are loaded every day. In this Activity Journals it is registered that a Material was listed (available) at a customer (value 0 or 1). We have a non-cumulative ke
-
Broken link to costs_eif.zip in OBE lesson
Hi, I'm attempting to follow the following OBE lesson on OLAP. http://www.oracle.com/technology/obe/obe9ir2/obe-dwh/olap/olap.htm Under prerequisites, there is a requirement to download COSTS_EIF.ZIP, but the link appears to be broken. Today, I'm get
-
Link to distribute shockwave player is broken
Hi, Not able to access the link for distributing Shockwave Player". Accessed the link "http://www.adobe.com/products/players/shockwave-player-licensing-distribution.html " and clicked on "accept to distribute shockwave player. The following link is b
-
It is a cool black & white smoke effect that I want to use. My goal is to place graphics over it and some under it. I am new to animation but hungry to learn! Thanks Everyone!