473,553 Members | 3,116 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MySQL Database Forum

MySQL database (open source) - Ask questions about mysql server, setup, queries, optimization, errors, tables, syntax, functions, SQL, storage engines, MySQL cluster, replication, scalability, availability, stored procedures, views and more.
8
12,607
thread by: Bob Sanderson | last post Feb 10 '06 by: Bob Sanderson
I am relatively new to PHP and MySQL. This is the first time I've tried to use multiple queries in a single script. I have the following PHP script which gets a Job Number from a search form and generates a web page which displays the record for that job: $username="root"; $password=""; $database="foobar";
4
12,573
thread by: henryrhenryr | last post Jul 25 '07 by: mwasif
Perhaps this should be in the PHP forum but I'll try here first... I'm trying to search some fields for complete words. The word can be in the middle of a string of text. My solution (perhaps there is a better one) is to use the following query: SELECT id, string FROM string_table WHERE string LIKE ('%This is my very long test string%')...
2
12,557
thread by: senthiltsj | last post Sep 6 '06 by: Jerry Gitomer
hi two days before arount 20,000 rows are manuly deleted, is there any way to recover it back. We have backup, that is 10 days old, Is there any way to recover only that 20,000 rows, Plz help me out ASAP. Regards Senthil Kumar.T
2
12,537
thread by: mfyahya | last post Jul 23 '05 by: Bill Karwin
I have two tables, both containing an 'authors' column. Is there a way to get a unique list of authors from the two tables? I tried SELECT DISTINCT `authors` from `table1`, `table2`; but I got an "Column 'authors' in field list is ambiguous" error. Is there also a query to return only the count of distinct authors from the two tables? ...
6
12,491
thread by: Randell D. | last post Jul 19 '05 by: Randell D.
Folks, My database receives HTML form values (text, I don't store binary files in any of my tables). When is it adviseable to create a table column with NOT NULL? I make a habit of having all my table columns this way but wonder if I am just putting additional overhead (however small) on the server and getting zero advantages... Anyone...
0
12,439
thread by: Mike | last post Jul 19 '05 by: Mike
My code is shown below, I can select * from employees but I cannot get any data back from SHOW FIELDS, I do not receive an error, in fact, something is returned but I'm not sure what. I can execute the command: SHOW FIELDS FROM test.employees in the Control Center just fine, even cmd.ExecuteReader will enter reader.Read() once, something...
3
12,431
thread by: svsenthilkumar | last post Jun 20 '08 by: r035198x
Hai, i want to insert a record and retrieve id using php-mysql. i want insert a record by copy of another one table. after inserting i update a field in the inserted record. so, can i insert a record and return the inserted record id. (each record will insert by a unique id).
5
12,428
thread by: ukfusion | last post Aug 10 '08 by: Atli
I have a database with two tables....one called categories and one called users. The categories table has a full list of business categories....the users table has all the usual fields plus a category field which relates to the business category, i need to output the full list of category names from the categories table but also have how many...
8
12,424
thread by: W.Davis | last post Jul 19 '05 by: W.Davis
Group, I'm using ver 5 with winXP. I can access the test database, but can't create a table. I can't create ANY database as I keep getting error 1044 (42000): Access denied for user: ' '@'localhost' to database 'mynewdatabase'. Can you help? TIA, Wade
3
12,406
thread by: naughtybynature | last post Sep 11 '06 by: naughtybynature
I got a problem to create SQL statement in calling two tables in the same database. I'm trying to call this two tables to view both of the table's content when i'm doing the search process in my system. For example, i have QUESTION field in table Question, and field A, B, C, and D in table Answer. So i would like to call both table to be displayed...
4
12,362
semanticnotion
thread by: semanticnotion | last post Dec 7 '10 by: semanticnotion
hi i have 3 tables in mysql i retrieved the data in xml using php now i want to retrieved the same data in json format but i have some problem in queries. i retrieved data from one table in json but unable to retrieved from three tables any help would be appreciated my code for one table is. $table_first = 'abc'; $query = "SELECT * FROM...
3
12,360
thread by: mlvander | last post Jan 29 '08 by: code green
I would like to be able to sum data in one table and count data in another table with one query. Is this possible ? Below is an example of what I would like to accomplish. tbl_class classid | provinceID_fk | class_enroll | grade 1 ----------- 1 ---------------- 2 ----------------- 7 2 ----------- 1 ---------------- 3 ----------------- 8 3...
2
12,359
thread by: Matthew Cascio | last post Jul 20 '05 by: Bill Karwin
My understanding is that using reserved words as column names is allowable as long as they are quoted. I am trying to create a table dynamically with columns defined by the first row of a text file I import. Unfortunately, I have no control over the column names and the data provider has chosen to use the word "USE" as a column name. "USE"...
2
12,359
thread by: samuel123 | last post Dec 5 '07 by: samuel123
Dear All, Greetings! I have problem that how to relate between two table in phpmyadmin. Say I have two tables, project -------
3
12,350
thread by: beautifulcarcass | last post Aug 17 '07 by: Atli
Hi, in this school project im making, im having a problem if i could display the column names from a table on a MYSQL database to a webpage through PHP with a loop is there a function to display the column names from a table?if not, are there any other webscripting languages that could do this function? because if i cant do this, i have to...
4
12,314
thread by: Mina Patel | last post Mar 5 '09 by: Shanthi Sivaram
Hi trying to find the number of duplicate tuples/records in table based on multiple columns ie. select count(distinct list multiple column key ) from x where date = y HAVING ( COUNT(multiple column key) > 1 ) doesn't seem to work....any tips? thanks
3
12,299
thread by: tanyali | last post Apr 17 '07 by: tanyali
I am using Linux RedHat , MySql Ver 14.12 Distrib 5.0.18 not enough disk space left on /dev/sda7, which I am working on, I insert BLOBs into database and the table is as big as 5.54468 GB I want to change the database to another directory which is on /dev/sda8 . I think I should use mysqldump to backup the table , after change the...
6
12,273
thread by: banderson407 | last post Jul 4 '07 by: Atli
I am new to MySql and PHP and am hoping that somone can help me with a query. I have a table called Test within it are several fields including: course_ID Test ID so within this table data a Course (course_ID) can have several test_IDs associated with it. So lets say course_ID (3) has test_IDs (2,4,5,7,9) and course_ID (5) has...
4
12,263
thread by: erik | last post Jul 19 '05 by: Randell D.
Hi I'm just started with MySQL and I'm having MySQL_CC running When I want to connect to my web-hotel database-server what port-number most i write - default seems to be 3306 but is that correct one??? (with 3306 i seems to connect to the database on my PC) -- Erik Reinert Nielsen www.nogn.dk
1
12,223
thread by: bips2005 | last post Jul 10 '08 by: coolsti
i have got two tables,one customer with fields cust_id,email and another with field cust_id,domname,expirydate. i have this query to combine these two tables to give me email and the expirydate as $sql = "SELECT l.email,s.expirydate from customer l, domain s where l.cust_id = s.cust_id "; i need to exclude those expirydates whose domname...
13
12,212
thread by: wideangle | last post Jul 23 '05 by: Raqueeb Hassan
Hello there! I know it's stupid, but when creating a table in a mysql (win32) database, it won't let me create this "mytable". Here goes my ER_PARSE_ERROR. mysql> CREATE TABLE `mytable` ( -> `mytable_id` int(25) NOT NULL auto_increment, -> `mytable_title` varchar(100) NOT NULL default '', -> `mytable_dts` varchar(25) NOT NULL...
6
12,211
thread by: terenceyuen | last post May 15 '07 by: terenceyuen
I would like to change the type of Null to NO ,what is the command for this? I've tried this one, but no luck to get it work. ALTER TABLE claims_summary ALTER COLUMN advance_call_details SET NOT NULL; Thanks. Terence +----------------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | ...
11
12,160
KeredDrahcir
thread by: KeredDrahcir | last post Sep 21 '10 by: code green
Have a table that needs to have results written to it, that will later be updated. To check if the table has been written to yet I'm using this code: $sql="SELECT DISTINCT field FROM table WHERE field=".$value; $new_result=mysql_query($sql,$db); if (!$new_result) { do xyz } When I do this it doesn't enter the...
13
12,138
thread by: Dark Rayden | last post Jul 23 '05 by: Felix Geerinckx
Hi! I recently got a strange problem and I have no idea on the solution. I try to do a ORDER BY statement with a fixed order of values, because my client want's it this way. My approach is like this: $the_row = "'A', 'B', 'B b', 'C', 'D d', 'E'";
2
12,132
thread by: Alien | last post Oct 6 '08 by: tomarvijay80
I just managed to use mysqldump to dump a database into a text file. Now I uploaded it into my server where i want to import it. I tried looking up in google and came up with this command: where web16u1 is my databse username and workready.txt is the file that contains all the CREATE TABLE stuff as output of mysqldump command. I got...

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.