10,946 Topics

Member Avatar for
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
94
Member Avatar for newbie14

Dear All, I got a standalone application where I update 3 db at one time. One on local db, one is central db and one more is the its exact copy of local db in the central server. So I have been using the normal begin and commit when there …

Member Avatar for lolafuertes
0
156
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
90
Member Avatar for zcj125

[CODE]<?php session_start(); $_SESSION['title'] = $_GET['form_book_title']; $_SESSION['ISBN'] = $_GET['form_book_ISBN']; $_SESSION['qty'] = $_GET['form_book_qty']; $_SESSION['fName'] = $_GET['form_book_fName']; $_SESSION['lName'] = $_GET['form_book_lName']; if($_SESSION['ISBN']=="" || $_SESSION['title']=="" || $_SESSION['qty'] =="" || $_SESSION['lName'] =="" || $_SESSION['fName'] =="") { echo "please fill out all the form fields"; echo "<a href=\"sell.html\"> Go Back"; }else require_once("db_info.php"); $con = mysql_connect($localhost,$username,$pw); if(!$con) exit(mysql_error()); …

Member Avatar for simplypixie
0
325
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
120
Member Avatar for aa26i

Hi, This may help others too here if i succeed. I created a web form (mysql database) by phprunner v6.0. all went well. form is showing mysql data, can submit, edit add delete data. now there is a programming part which is need to be done and because of lack …

Member Avatar for aa26i
0
290
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
131
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
129
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
181
Member Avatar for drsmith

I have heard that AJAX is a way to get a page to refresh when a MySQL db has changed. Basically we have a log (that several users at a time could be looking at), when data is submitted it posts to the MySQL db. Instead of having the page …

Member Avatar for twoclicks
0
530
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
218
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
231
Member Avatar for 1stoptutorials

Hey Everyone hope all well. I have this code that works perfectly on a mysql database [CODE]<?php // visit http://php.net/pdo for more details // start error handling try { // connect $pdo = new PDO('mysql:host=localhost;dbname=name', 'name', 'password'); // enable error handling through exceptions $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // create safe query $query …

Member Avatar for mlesniak
0
295
Member Avatar for leechyeah

Dear, I am new to PHP and MySQL. I have a simple order form on my site: 1 column with "member" and one with "comment". I am able to Insert rows when a user submits the form. But when a user wants to modify that data, the form inserts another …

Member Avatar for leechyeah
0
217
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
233
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
199
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
306
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
236
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
212
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
108
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
322
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
234
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
197
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
47
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
365
Member Avatar for newbie14

Dear All, I got a query where I would like to select the clientName from tblClient but with condition that this clientID does not exist in another table call tblCDSValidity. I tried like this but it failed. [CODE] SELECT tblClient.clientID, tblClient.clientName FROM tblClient,tblCDSValidity Where tblClient.clientStatus='a' And tblClient.clientID!=tblCDSValidity.clientID ORDER BY tblClient.clientName …

Member Avatar for newbie14
0
174
Member Avatar for Draucia

I have a question secuirty. Is it safe enough to do: [CODE] $fname = mysql_real_escape_string(htmlentities($_POST['fname'])); $lname = .....($_POST['lname'])); etc [/CODE] and insert it into the table like: [CODE] mysql_query("INSERT INTO North_America (first_name, middle_name, last_name, email, phone, country) VALUES('$fname', '$mname', '$lname', '$email', '$phone', '$country') ") or die(mysql_error()); [/CODE] Or do I …

Member Avatar for jlego
0
241
Member Avatar for manc1976

I have created a form that uses a drop-down box to save information to a MySQL database using a php script I wrote. That works perfectly, but the problem I have is when I am trying to edit the information in the database. I have created an edit form that …

Member Avatar for manc1976
0
10K
Member Avatar for oldezwe

I've found really good information/tutorials online for writing from my java application to my MySQL database. Can someone direct to one on retrieving information from my database to store as variables in my application? Thanks Peace and love, oldezwe

Member Avatar for pro_learner
0
169
Member Avatar for oldezwe

i am using java, how do i get the database to tell me how many elements are in it and save that as an integer

Member Avatar for techsheaven
0
68
Member Avatar for furlanut

On a MySQL table the Date column is set at YYYY-MM-DD with some dates shown as 0000-00-00 (Default set at NULL) where no date is available. This is OK until I display the web page that contains the php code for the SELECT query. All the 0000-00-00 dates are displayed …

Member Avatar for cereal
0
130
Member Avatar for Danny159

Hey, I have a database of events... and I need to add a row for each day for a year... so there will be 365 rows in the database, but the date format must be as follows: Row 1 Start Date: 2012-01-01T00:00 End Date: 2012-01-01T23:59 Row 2 Start Date: 2012-01-02T00:00 …

Member Avatar for pzuurveen
0
166
Member Avatar for riya_developer

Hello, how to pass string to MySql stored procedure and append it to query in stored procedure? can anyone tell me this MySql syntax?

Member Avatar for smantscheff
0
70
Member Avatar for staticwave

I recently inherited a website and they have a simple back-end area which was created using phpmaker. The back-end displays various MYSQL database tables. There are two tables which hold registration information related to promotions/contests the company runs online. The client wants to begin archiving the registration data monthly, but …

Member Avatar for smantscheff
0
1K
Member Avatar for harsha.netpem

Hi, How can we edit the select button option using radio button which is already selected in the output and we can select other option, using PHP form and also update in mysql database. For E.g:- Agreement Received :- O Y es O No In the output, If the agreement …

0
48
Member Avatar for KadajXII

Dear all, Hear my case. My project, Android project, when user launch the application, it will send device's travelling speed and location to web server, 2s interval. Then from the web server, it need to return a location if device's travelling speed is less than 30kmh. So my problem is …

0
70
Member Avatar for 650U

I have a mysql table named 'customer'. serialnumber (int), name(varchar), gender(varchar) are the table fields. I have a int variable a = 2. I want to fetch the value from the table when serialnumber = a. That is when the serialnumber = 2 it should display the particular customer's name. …

Member Avatar for |-|x
0
191
Member Avatar for PF2G

Hi, DaniWeb I'm having problems with the insert: (This is the login code, i can't open the register form) [CODE] Imports MySql.Data.MySqlClient Public Class Login Dim server As String = "Server=localhost;Database=escola_musica;Uid=root;Pwd=;" 'Dim server As String = "Server=localhost;Database=esola_musica;Uid=root;Pwd=;" Dim con As New MySqlConnection Dim da As New MySqlDataAdapter Dim sql As …

0
68
Member Avatar for Zedith

Hi I have a php code with a string that I'm trying to find in an MySql database. But...I'm getting empty result set. The database has a varchar column named news_url with this in it "/is/frettir/titill". What I'm trying to do is search for this row with that string in …

Member Avatar for pritaeas
0
176
Member Avatar for amie900218

hai, can somebody help me, how to change root password for mysql in CPANEL? i tried to put my website online, but it send message : Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in /home/akmajuco/public_html/_class/cms_class.php on line 9 Access denied for user 'root'@'localhost' (using password: YES) …

Member Avatar for amie900218
0
252
Member Avatar for MDanz

With the below query I'd get the results one and three. How do I get the results for `sid`; 15 and 17? I can't use a WHERE because I won't know the `sid`. A better way of explaining is, how do I LIMIT per `sid` without grouping? [CODE]mysql_query("SELECT * FROM …

Member Avatar for smantscheff
0
154
Member Avatar for joshmac

I am wanting to learn the singleton method, and I am having an issue with my code. I've been manipulating my own code for a few days now, but decided to use someone else's class to give it a try, and I am still coming up with nothing. Any help …

Member Avatar for joshmac
0
135
Member Avatar for vspadmanabhan

Hi, I have to create an executable to put in windows task bar to read foxpro dbf file and update mysql table in the web server by checking new records in the dbf file comparing the unique key in both table whenever the internet connection is available in the desktop …

Member Avatar for diafol
0
327
Member Avatar for gorleone

Hi Guys, I have a 2 errors with PDO: Sometimes give me this error: Connection error, because: SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 111 Other time sent me this: SQLSTATE[42000] [1203] User [MYUSERNAME] already has more than 'max_user_connections' active connections This is …

Member Avatar for gorleone
0
148

The End.