7,368 Topics

Member Avatar for
Member Avatar for klemme

Hi everyone, I have made a script which logs the users ip into a table. Here is the table: [CODE] ID - PKEY A.INC IP - VARCHAR ENTERED - TIMESTAMP [/CODE] What I would like to happen is that after a row has been inserted, I want to set up …

Member Avatar for klemme
0
322
Member Avatar for oldezwe

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 …

Member Avatar for vadriaan
0
206
Member Avatar for geaclaesson

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 …

Member Avatar for geaclaesson
0
565
Member Avatar for challanger

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++ …

Member Avatar for challanger
0
1K
Member Avatar for dunktap

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 …

Member Avatar for dunktap
0
162
Member Avatar for MitchellJ

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. …

Member Avatar for MitchellJ
0
3K
Member Avatar for daniel36

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.

Member Avatar for joban.ali
0
92
Member Avatar for churni

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 …

Member Avatar for invisal
0
1K
Member Avatar for nursayy
Member Avatar for freebird6797

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 …

Member Avatar for rch1231
0
88
Member Avatar for khess

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 …

Member Avatar for evanx
0
1K
Member Avatar for furlanut

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 …

Member Avatar for simplypixie
0
117
Member Avatar for neorahav

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, …

Member Avatar for rotten69
0
129
Member Avatar for minitauros

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 …

Member Avatar for smantscheff
0
126
Member Avatar for qwertpink

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 * …

Member Avatar for qwertpink
0
179
Member Avatar for kingofnothing

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 …

Member Avatar for kingofnothing
0
208
Member Avatar for newbie14

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 …

Member Avatar for newbie14
0
221
Member Avatar for oldezwe

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 = …

Member Avatar for stultuske
0
226
Member Avatar for 54uydf

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 …

Member Avatar for pritaeas
0
192
Member Avatar for Psyho

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 …

Member Avatar for diafol
0
297
Member Avatar for oldezwe

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 …

Member Avatar for Ezzaral
0
232
Member Avatar for towerrounder

Hi all. I come from an MS SQL background and a newbie in MY SQL. Im trying to run a simple query to populate a table: [CODE]Declare @I As Int Select @I = 1 While (@I < 100) Begin Insert into tbWhatEva Select @I Select @I = @I + 1 …

Member Avatar for towerrounder
0
208
Member Avatar for |-|x

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 …

1
103
Member Avatar for BenzZz

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 …

Member Avatar for BenzZz
0
315
Member Avatar for andarivaadu1

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 …

Member Avatar for andarivaadu1
0
233
Member Avatar for frotek

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 …

Member Avatar for frotek
0
195
Member Avatar for oldezwe

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?

Member Avatar for anand01
0
43
Member Avatar for tuse

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?

Member Avatar for Offirmo
0
1K
Member Avatar for oldezwe

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 …

Member Avatar for JamesCherrill
0
2K
Member Avatar for Wolxhound90

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 …

Member Avatar for Wolxhound90
0
355

The End.