7,368 Topics
|
|
Here is my code... [CODE]import java.sql.Connection; import java.sql.DriverManager; import java.sql.Statement; public class example1{ public static void main(String[] args) { try { Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","user","password"); Statement state = (Statement) con.createStatement(); String username = "John"; String password = "John1"; int experience = 0; int level = 1; String insert = "INSERT … |
|
Hi guys, Used this forum a bit today to find answers for a bit of scripting that I'm attempting. It's been 5-6 years since I last did anything like this, so bear with me. My question is; why does this generate results from Dec 12 2011 and not from Dec … |
|
Hi I am having trouble trying to connect to a local MySql db using the MySQL Connector/C++. I was able to successfully compile the bellow code but when I run it results in a Segmentation fault. I am trying to run this on a Windows XP machine using the g++ … |
|
Hey everyone! I am working on a project that involves querying a mysql database using php, and I am running into some issues. html form is in list_files.php and the query is in query.php .. i also attached my mySQL database which has 2 tables: only the file table is … |
|
Hi Everyone- We are building a database that needs table(purchaser) to check table(paypal) for a matching telephone number. Table(paypal) has 'purchaser telephone' as PK and table(purchaser) has 'purchaser telephone' as FK. I can insert and see the data in both tables, but running a select query returns an empty result. … |
|
can anybody give me query of current version of my sql of [CODE]$sql = "SELECT entries.*, catagories.cat FROM entries, catagories WHERE entries.cat_id = catagories.id ORDER BY dateposted DESC LIMIT 1;";[/CODE] i will be thankful. |
|
Hi All I am creating a program which will (in the end) help me quickly transfer products from one category into another within a MySQL Database. I have a database with TWO separate tables which are connected using INNER JOIN where the products have a categoryID as do the categories … |
|
Hi there, I am real newbie in MySQL. I just installed My SQL workbench and created a table in workbennch. I am trying to open the MYSQL client to see if the script that I ran was successful and all I see this this command line window flash for a … |
|
A new version (9.0) of [URL="http://www.postgresql.org"]PostgreSQL[/URL] is in beta and ready for public testing. If version 9.0 lives up to its proposed [URL="http://www.postgresql.org/about/featurematrix"]feature list[/URL], then it is serious competition for MySQL. PostgreSQL proponents have long suggested that PostgreSQL has always enjoyed superiority over MySQL. I beg to differ but that … |
|
I am trying to combine a MySQL query with change date format so all rows display as d-m-Y (surely possible ?) in results. The datefield type is DATE. [CODE]$query="SELECT * FROM table DATE_FORMAT('datefield','%d-%m-%Y')AS datefield FROM table";[/CODE] SELECT*FROM table on its own displays datefield as YYYY-MM-DD but DATE_FORMAT does not change … |
|
Hi all, I really need help for fixing one of the issue in my project. We have a passenger table which is used for Airlines operation. We need to sort the passengers by their seat numbers. Seat numbers are in format <1/2digits><1Alphabet> eg: 1A, 1B, 1C, 22A, 11B, 24D, 9A, … |
|
The case: On my site there are four profile types: persons, artists, companies and events. A user can create multiple profiles. Each profile can be connected to another profile. So a person-profile can for example connect to an artist-profile, but also to an event-profile, and an event-profile can connect to … |
|
dear all i have 2 tables, one is project table and another replies table. [ICODE]"SELECT * FROM project, replies WHERE replies.member_id=$_SESSION[member_id] AND project.project_id=replies.project_id ORDER BY project.project_id "; [/ICODE] the above code gives me all , but I need the latest updated replied in each project id I tried [CODE]SELECT * … |
|
hi everyone when i tried to import my web site database to local sql server myphpadmin show me this errors i dont know why ?? please help me [QUOTE]Error SQL query: -- -- Database: `hakaek10_alqemaalhakaek` -- -- -------------------------------------------------------- -- -- Table structure for table `rafia_admin_menu` -- CREATE TABLE IF NOT … |
|
Dear All, I got one table as the tblMasterData then I left join it with another table like this tblEventAlert. So what I want to do if there is a match between tblMasterData and tblEventAlert then for that tblEventAlert I would like to match it with tblDevice to to get … |
|
Below is what I have been attempting to do. [code]retrive number of rows from MySql table; for(int i = 1; i <= numberOfRows; i++){ retrive userID, level at position(i) in table; // next i need to insert userID into array, level amount of times (ex. userID = 4, level = … |
|
my table has 2 fields, both are Keys. I save similar items in that table , like if 2 items are similar but have different Ids (in another table) I use this table to know that they are similar. so if items 1111, 1112 are the same and 1000,1002,1004 are … |
|
Hello all. I have a bit of a problem. I have a few php pages all encoded utf-8. A MySQL database, where it is possible to have characters like: 'á'é'ú'Å‘'ü' and so on, i have set with phpmyadmin to be utf8_hungarian_ci character encoding. Funny thing is, that when I write … |
|
I am attempting to take 2 integers from a MySql table. X represents a number that will be stored into an array. Y represents the number of times that X will be put into the array. I am attempting to make a loop that will go through, find all the … |
|
I was just about to post asking how to do this when I stumbled across the solution. All my research on the web suggests that the only way is to use stored procedures with an output parameter. Unfortunately, my queries are necessarily dynamically generated, and output parameters do not work … |
|
I was wondering if the following in terms of tables and keys is possible: Login([U]username, date_time_login[/U]) Customer([U][I]username[/I][/U], surname, ...) Driver([U][I]username[/I][/U], surname, ...) Admin([U][I]username[/I][/U], surname, ...) Booking([U]b_no[/U], [I]cust_id[/I], [I]driver_id[/I], ...) Primary keys are underlined and foreign keys are in italics. I want the Customer, Driver and Admin username primary key fields … |
|
I have a code like this [CODE] <? php .. if ($type == 1) //book { echo $information_array[0]. '. <i><a href="updatebook.php?q=$information_array[1]">'. $information_array[1] . '</a></i>. '. $information_array[2] . ": " . $information_array[3]. ".<br/>"; } .. ?> [/CODE] In the next page [CODE] <?php $title= $_GET['q']; echo $title; ?> [/CODE] when I … |
|
hi. how can i save image file in mySQL from vb.net? [URL="http://i31.photobucket.com/albums/c395/altaircavida/help1.jpg"]my vb.net program picture[/URL] the image i want to save in mySQL database is already in the picture box [URL="http://i31.photobucket.com/albums/c395/altaircavida/help2.jpg"]mySQL table[/URL] and this is my SQL tables now how can i add the image in the picture box to … |
|
once I have requested my result set from my server, how do i store it as the variable that I want it to be? EX. [CODE]ResultSet rs2 = st.executeQuery("select userIDnum from userInfo where username = '"+username+"'");[/CODE] how do i then save userIDnum as an integer to use in my program? |
|
I need to check if a databse user exists and if not, create that user. However, I do not know the statement to check if a user already exits. How to check if a user already exists in MySQL? |
|
I'm having a hell of a time trying to make a login form. This is what I have at the moment.... [CODE]import javax.swing.*; import java.sql.*; import java.awt.*; import java.awt.event.*; class LoginDemo extends JFrame{ JButton SUBMIT; JLabel label1,label2; final JTextField text1,text2; LoginDemo(){ setTitle("Login Form"); setLayout(null); label1 = new JLabel(); label1.setText("Username:"); text1 … |
|
Hey all, I'm trying to have a ListBox show a list of tables available in a database. This can then be selected to be used later on. My problem is getting the actual table name to show up. I have the connection to the mysql database working properly, but it … |
The End.