Executing MySQL Commands From Within C Program

2004-03-21 Thread Rick Emery
I am attempting to interface between a simple C program and MySQL, but without luck. I searched the MySQLforum archives to see if there was info specific to this problem. While there were other folks who had problems connecting C/C++ to MySQL, none of the issue were similar to this, that is lin

Re: Executing MySQL Commands From Within C Program

2004-03-21 Thread Rick Emery
See my original post below prior to reading the next 4 lines.. In addition to what I tried below, I tried the following (with this result): $ ld -lmysqlclient -o myprog myprog.o ld: warning: cannot find entry symbol _start; defaulting to 08048208 /usr/lib/libmysqlclient.so: undefined reference to

Re: select statement not working in a php page

2004-03-22 Thread Rick Emery
What result are you getting? First off, I see that your HTML is possibly incorrect; should it be: echo "Warranty ID:\n"; is a table header. Second, if you are expecting a single result row, then you do not need the while() loop. Do a single fetch and display the result. rick "People will for

Re: PHP script cannot connect MySQL server

2004-03-22 Thread Rick Emery
/var/lib/mysql/mysql.sock is created when the mysql server starts. It disappears when mysql shuts down. Did you provide access to the databases as root? Is there a password associated with access? For instance, how do you statr mysql from the command line: mysql -u root -ppassword mydatabas

Cannot Resolve External Symtab Entries to mysqlclient Library Within C Program

2004-03-22 Thread Rick Emery
I am attempting to interface between a simple C program and MySQL client library, but without luck. I searched the MySQLforum archives to see if there was info specific to this problem. While there were other folks who had problems connecting C/C++ to MySQL, none of the issue were similar to t

Re: created user but access denied

2004-03-23 Thread Rick Emery
Remove space between '-p' and the password in you command line. That is>>bash-2.05a$ mysql -uwcjporoot -pwc_jpo - Original Message - From: "Egor Egorov" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, March 23, 2004 6:36 AM Subject: Re: created user but access denied D

RE: PHP does not see Table updates

2002-02-07 Thread Rick Emery
Show us your code. What are your table structures like? -Original Message- From: AOK Lansing [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 12:37 PM To: [EMAIL PROTECTED] Subject: PHP does not see Table updates I am using PHP to access a MySQL DB. If I stop MySql and the

RE: Reset auto_increment

2002-02-07 Thread Rick Emery
The following deletes all records and re-starts renumbering from 1; DELETE FROM mytable; The following deletes all records and continues counting from where the table last left off: DELETE FROM mytable WHERE 1; If you are trying to restart numbering while not deleting records, forget-about-it. -

RE: Exclusion Query help

2002-02-08 Thread Rick Emery
I'm trying to figure out the bloody hell you're looking for. What is date3? Where does it come from? I think I speak for most folks here when I say... What is date4? Where does it come from? What is date4? Where does it come from? Why is record 2 good, but not record 3? How does Phase enter i

RE: Table join question

2002-02-12 Thread Rick Emery
show us your table structure show us your table values -Original Message- From: Barry J. Wiegan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 05, 2002 11:00 AM To: [EMAIL PROTECTED] Subject: Table join question Hi, I'm trying to build a query to solve a fairly simple problem. I ha

RE: ignoring in ORDER

2002-02-12 Thread Rick Emery
About 3 months ago, there was a long discussion thread about this very topic. Final answer: "the","a","an" must be handled in the language (perl/php/etc...). Or, you must change data in your fields so that these words are NOT the first in the field. -Original Message- From: abdul - "ÚÈ

RE: Columns

2002-02-12 Thread Rick Emery
UPDATE mytable SET newcol=oldcol; -Original Message- From: Max Mouse [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 3:11 PM To: [EMAIL PROTECTED] Subject: Columns Hey all, Is it possible to copy the contents of one column to another column using mySQL? I just changed my

RE: forms?

2002-02-12 Thread Rick Emery
The PHP/MYSQL combo is also a good choice, as is PERL/MYSQL -Original Message- From: Joshua J.Kugler [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 11:44 AM To: Jim Hatridge; [EMAIL PROTECTED] Subject: Re: forms? Using Perl/CGI and DBI::MySQL would work for forms. You could

RE: Exclusion Query help

2002-02-12 Thread Rick Emery
If I understood you correctly you are comparing Record_ID to Phase_ID try this: SELECT rx.* FROM records rr LEFT JOIN records rx ON rr.Record_ID=rx.Phase_ID WHERE rr.Record_Date>@date1 && rr.Record_Date<@date2 && NOT (rx.Record_Date>@date3 && rx.Record<@date4); This assumes that @date1, @d

RE: Exclusion Query help

2002-02-12 Thread Rick Emery
If I understood you correctly you are comparing Record_ID to Phase_ID try this: SELECT rx.* FROM records rr LEFT JOIN records rx ON rr.Record_ID=rx.Phase_ID WHERE rr.Record_Date>@date1 && rr.Record_Date<@date2 && NOT (rx.Record_Date>@date3 && rx.Record<@date4); This assumes that @date1, @d

RE: Exclusion Query help

2002-02-12 Thread Rick Emery
If I understood you correctly you are comparing Record_ID to Phase_ID try this: SELECT rx.* FROM records rr LEFT JOIN records rx ON rr.Record_ID=rx.Phase_ID WHERE rr.Record_Date>@date1 && rr.Record_Date<@date2 && NOT (rx.Record_Date>@date3 && rx.Record<@date4); This assumes that @date1, @d

RE: PHP does not see Table updates

2002-02-13 Thread Rick Emery
Show us your code. What are your table structures like? -Original Message- From: AOK Lansing [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 12:37 PM To: [EMAIL PROTECTED] Subject: PHP does not see Table updates I am using PHP to access a MySQL DB. If I stop MySql and the

RE: Can this be done?

2002-02-13 Thread Rick Emery
What do your tables look like? Structure? What are you trying to do? What does your data look like? -Original Message- From: Ed Lazor [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 10, 2002 8:12 PM To: [EMAIL PROTECTED] Subject: Can this be done? I'm trying to update a database. H

RE: Reset auto_increment

2002-02-13 Thread Rick Emery
The following deletes all records and re-starts renumbering from 1; DELETE FROM mytable; The following deletes all records and continues counting from where the table last left off: DELETE FROM mytable WHERE 1; If you are trying to restart numbering while not deleting records, forget-about-it. -

RE: Clear table contents

2002-02-13 Thread Rick Emery
try: DELETE FROM relay_ip WHERE UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(rei_ts) >600; -Original Message- From: Odhiambo Washington [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 1:22 AM To: [EMAIL PROTECTED] Subject: Clear table contents Hello gurus, Please allow me to requ

RE: Clear table contents

2002-02-13 Thread Rick Emery
something easier: DELETE FROM relay_ip WHERE NOW() - rei_ts > 1000; -Original Message- From: Rick Emery Sent: Tuesday, February 12, 2002 3:03 PM To: 'Odhiambo Washington'; [EMAIL PROTECTED] Subject: RE: Clear table contents try: DELETE FROM relay_ip WHERE UNIX_

RE: Duplicate Records

2002-02-13 Thread Rick Emery
A quick method is to create a new table: CREATE TABLE newtable SELECT DISTINCT * FROM oldtable; note; manually verify newtable has your data. Then proceed: DROP TABLE oldtable; CREATE TABLE oldtable SELECT * FROM newtable; DROP TABLE newtable; -Original Message- From: Rich [mailto:[E

mysql list test - ignore

2002-02-13 Thread Rick Emery
I apologize for using bandwidth...it appears my posts are no longer going to the [EMAIL PROTECTED] mailing list. I'm just verifying before rteporting it, if necessary magic words: sql,database,query - Before posting, please chec

RE: Re: Indexes on UPDATE/DELETE

2002-02-13 Thread Rick Emery
>Also, how do I reset an auto-increment value back to 1 (with all >rows being already deleted of course). The following deletes all records and re-starts renumbering from 1; DELETE FROM mytable; The following deletes all records and continues counting from where the table last left off: DELETE F

RE: Is The MySQL Mailing List On Crack?

2002-02-13 Thread Rick Emery
I'm not certain about the list. I mailed several message on Tuesday about 3 PM central time. They did not appear until 4:30 AM Wednesday. Many of my messages were duplicated because I did not see them in the list when I mailed them so I was uncertain whether I had even mailed them. Today, I se

RE: Is The MySQL Mailing List On Crack?

2002-02-13 Thread Rick Emery
I posted a message at 7:22 AM (US Central). It just appeared at 11:15 AM (US Central) -- > -Original Message- > From: Jeremy Zawodny [mailto:[EMAIL PROTECTED]] > Sent: 13 February 2002 01:15 > To: [EMAIL PROTECTED] > Subject: Is The MyS

RE: [SQL] How to delete multiple instances

2002-02-13 Thread Rick Emery
If you're using mysql 4.0, you might try: DELETE addrbkb FROM addrbkA,addrbkB WHERE addrbkA.phone=addrbkB.phone; This functionality was added with 4.x. I haven't tested this, so BEWARE The following is from the 4.0 manual: DELETE t1,t2 FROM t1,t2,t3 WHERE t1.id=t2.id AND t2.id=t3.id In the abov

RE: re-ordering rows

2002-02-14 Thread Rick Emery
Why is the internal order important? When SELECTing, the internal order is of no importance to MYSQL. It does not speed-up the query or access. When discussing relational database systems, all that matters is the order of output. -Original Message- From: Victoria Reznichenko [mailto:[E

FW: [PHP] MySQL question...not sure if this is the correct forum to ask.

2002-02-14 Thread Rick Emery
-Original Message- From: Peter Ruan [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 4:04 PM To: [EMAIL PROTECTED] Subject: [PHP] MySQL question...not sure if this is the correct forum to ask. Hi, Can the UPDATE statement have conditional check embedded in it? I have a page

RE: connections to MySQL

2002-02-15 Thread Rick Emery
does your test app connect with root as the user? -Original Message- From: Lonnie Cumberland [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 12:12 PM To: [EMAIL PROTECTED] Subject: connections to MySQL Hello All, I am new to this list and hope that someone could answer this

RE: Left Join problem - Please Help

2002-02-15 Thread Rick Emery
Show us your table structure, some table values and the SELECT statement that works and the one that doesn't -Original Message- From: Miretsky, Anya [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 12:13 PM To: '[EMAIL PROTECTED]' Subject: Left Join problem - Please Help Whene

RE: When does the timestamp field gets updated?

2002-02-15 Thread Rick Emery
timestamp is automatically updated -Original Message- From: George Labuschagne [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 1:20 PM To: [EMAIL PROTECTED] Subject: When does the timestamp field gets updated? Hi all, If one uses the timestamp data type for a column inside a

RE: Left Join problem - Please Help

2002-02-15 Thread Rick Emery
he mysql list to see what the experts think. -Original Message- From: Miretsky, Anya [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 2:17 PM To: 'Rick Emery' Subject: RE: Left Join problem - Please Help Biblio has 11,901 and keyword has 87,971, also I indexed the

RE: Left Join problem - Please Help

2002-02-15 Thread Rick Emery
possibly -Original Message- From: Miretsky, Anya [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 2:32 PM To: 'Rick Emery' Subject: RE: Left Join problem - Please Help When I do this without specifying a left join with just :select biblio.* from biblio,keyword wher

RE: Copying the structure of DBs

2002-02-18 Thread Rick Emery
CREATE TABLE newtable SELECT * FROM oldtable LIMIT 0; -Original Message- From: Todd Ellner [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 12:58 PM To: [EMAIL PROTECTED] Subject: sql: Copying the structure of DBs I need to create multiple databases from time to time. This is

RE: RPMS for Development Branch

2002-02-18 Thread Rick Emery
and the URL is??? it's not www.codemonsters.net; I just checked -Original Message- From: Brian P. Austin [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 3:20 PM To: [EMAIL PROTECTED] Cc: mysql Subject: RPMS for Development Branch Hello all, I have finished setting up a web

RE: basic query question

2002-02-19 Thread Rick Emery
assuming that engaedto refers to an id, your query might be: SELECT a.lname,a.fname,b.engagedto FROM mydata a LEFT JOIN mydata b ON(a.id=b.engagedto); -Original Message- From: Dean Householder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 11:22 AM To: [EMAIL PROTECTED] Subj

RE: appropriate datatype - blob/text?

2002-02-19 Thread Rick Emery
do you need to search on it? If not, perhaps storing these files separately with a pointer storedd in the database. This will improve searching speed I understand. -Original Message- From: Lee [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 10:29 AM To: MySQL Subject: approp

RE: basic query question

2002-02-19 Thread Rick Emery
> select id, lname, fname, pic from database where engagedto=id; Sorry, mate, that won't work. That will find folks who are engaged to themselves, i.e., narcissists -Original Message- From: Oliver Heinisch [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 11:30 AM To: [EMAIL

RE: v3.22.32 and temp tables

2002-02-19 Thread Rick Emery
>From the manual: In MySQL Version 3.23, you can use the TEMPORARY keyword... Sorry, mate, you are SOL until you upgrade -Original Message- From: Brian Warn [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 12:09 PM To: 'MySQL List' Subject: v3.22.32 and temp tables Hi, I wan

RE: basic query question

2002-02-19 Thread Rick Emery
You're very close: mysql> select p1.lname, p1.fname, p2.lname as engaged_lname, p2.fname as engaged_fname from members p1, members p2 where p1.id = p2.engagedto; but the REAL question is "What do you want out of the query"? -Original Message- From: Dean Householder [mailto:[EMAIL PROTEC

RE: Non-Sequential Primary Key Index

2002-02-21 Thread Rick Emery
This is not a problem. Please help me to understand: why would you WANT the primary key field to be updated? I ask, because if the fields of other tables refer to the primary keys of phpSP_users and then the primary key of phpSP_users was updated due to deletions; the result would be that those

RE: MySQL Book

2002-02-21 Thread Rick Emery
MySQL by Paul DuBoise Paul monitors this mailing list, so if you have questions concerning what you've read, he may answer. -Original Message- From: Danis Stéphane (NHQ-AC) [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 1:08 PM To: Mysql (E-mail) Subject: MySQL Book Any b

RE: MySQL Book

2002-02-21 Thread Rick Emery
oops... Do I get credit for capitalizing the B in DuBois? -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 3:57 PM To: Rick Emery; 'Danis Stéphane '; Mysql (E-mail) Subject: RE: MySQL Book At 13:25 -0600 2/21/02, Rick E

RE: Linking tables using INNER JOIN

2002-02-21 Thread Rick Emery
try: select * from MapConfig mc LEFT JOIN ConfigString USING (id) LEFT JOIN ConfigInt cf on mc.id=cf.id WHERE MapConfig.layername = "Roads"; -Original Message- From: Christopher Thompson [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 21, 2002 4:24 PM To: [EMAIL PROTECTED] Subject:

RE: How to rewrite this statement.

2002-02-22 Thread Rick Emery
You cannot do nested JOINs. Try: INNER JOIN FORUMCAT1 ON USERS.ID = FORUMMSG1.AUTHORID INNER JOIN FORUMMSG1 ON FORUMCAT1.ID = FORUMMSG1.POSTNUMBER -Original Message- From: Mat Murdock [mailto:[EMAIL PROTECTED]] Sent: Friday, February 22, 2002 1:12 PM To: [EMAIL PROTECTED] Subject: Re:

RE: auto increment problem

2002-02-25 Thread Rick Emery
1. The auto_increment will not occur on failure. Try it yourself to verify; I did. 2. When you delete a row, you DO NOT WANT the auto-increment to re-number. You SHOULD have gaps. Why? Because if the auto_incremented field is a primary key, and there are other tables who fields refer to that

RE: How to pass mysql connections across exec()

2002-03-11 Thread Rick Emery
have you tried forking the process, then terminating the parent? All open file desciptors, including sockets, would be available to the child. The child would contain the code in try1.c. -Original Message- From: Manvendra Bhangui [mailto:[EMAIL PROTECTED]] Sent: Monday, March 11, 2002 5

RE: [PHP-DB] Delete problem

2002-03-13 Thread Rick Emery
MySQL does not currently support sub-selects. The manual says: DELETE [LOW_PRIORITY | QUICK] FROM table_name [WHERE where_definition] [ORDER BY ...] [LIMIT rows] Did you review the manual first? -Original Message- From: Riccardi Moreno [mailto:[EMAIL PROTECTED]] Sent: Wednes

RE: starting mysql

2002-03-13 Thread Rick Emery
ensure that /tmp has correct read-write-execute permissions -Original Message- From: Hresko, Christian A. [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 13, 2002 10:57 AM To: '[EMAIL PROTECTED]' Subject: starting mysql i'm moving MySQL over to unix and i can't for the life of me get

RE: Cannot access the Database on same Machine

2002-03-19 Thread Rick Emery
this file is created when MYSQL starts check the directory to ensure it has the correct read-write permissions check the list archives; this question has been asked almost every day -Original Message- From: colin o [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 19, 2002 3:05 PM To: mys

RE: how to do when the table files become bigger and bigger

2002-03-21 Thread Rick Emery
What is the problem you wish to resolve? Define it. -Original Message- From: Buding Chen [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 6:33 AM To: [EMAIL PROTECTED] Subject: how to do when the table files become bigger and bigger Hi, all: I am doing a project that we w

RE: Query syntax help

2002-03-21 Thread Rick Emery
AND date >= "2002-03-17"; -Original Message- From: rory oconnor [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 10:49 AM To: mysql "list (choose midget) Subject: Query syntax help I'm trying to figure out a query that will tell me the total number of people in our house email

RE: querying check constraints

2002-03-22 Thread Rick Emery
I don't understand your question -Original Message- From: Sukhdev Sethi [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 7:20 AM To: [EMAIL PROTECTED] Subject: querying check constraints Hi, I have created a table as below: create table myTable ( Field1 int auto_increment no

RE: problems deleting a user from "user" db

2002-03-25 Thread Rick Emery
delete from user where user="wus"; -Original Message- From: Manuel Hendel [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 12:24 PM To: MYSQL List Subject: problems deleting a user from "user" db I got problems deleting a user which I've created before. mysql> delete from user

RE: Enforcing Column Types

2002-03-27 Thread Rick Emery
> I have a column that is VARCHAR(32). I use it to store MD5 hash values. MD5 hashes are always 32 byte. So use char(32) instead. I do. -Original Message- From: Joel Rees [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 26, 2002 11:30 PM To: Tino Didriksen Cc: [EMAIL PROTECTED] Subject: R

RE: What is wrong in this query???

2002-03-27 Thread Rick Emery
You cannot update multiple tables in a single UPDATE. Did you read the manual? -Original Message- From: Javier Armendáriz [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 2:04 PM To: MySQL Subject: What is wrong in this query??? Can someone tellme the problem in this query??

RE: Queries help (part II)

2002-03-28 Thread Rick Emery
$query = "SELECT * FROM gigs WHERE date > '$today' ORDER BY date ASC LIMIT 3"; -Original Message- From: David Rice [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 2:20 PM To: [EMAIL PROTECTED] Subject: Queries help (part II) Hey thanks i got it to work sort of $query = "SELEC

RE: Why does my delete not work :(

2002-03-29 Thread Rick Emery
>From the manual: DELETE [LOW_PRIORITY | QUICK] FROM table_name [WHERE where_definition] [ORDER BY ...] [LIMIT rows] Please note: there can be no SELECT clause.. -Original Message- From: sunny [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 8:15 AM To: [

RE: multiple delete for mysql

2002-04-02 Thread Rick Emery
mysql version 4.x does this -Original Message- From: David yahoo [mailto:[EMAIL PROTECTED]] Sent: Monday, April 01, 2002 5:28 PM To: [EMAIL PROTECTED] Subject: multiple delete for mysql Hi all, How can i do a delete from multiple table in mysql? Eg : I want ot delete record something

RE: easy query question

2002-04-02 Thread Rick Emery
select id, shortdescription, title from reviews where title REGEXP '^[0-9&#$].*' ORDER BY title ASC -Original Message- From: Jay Paulson [mailto:[EMAIL PROTECTED]] Sent: Monday, April 01, 2002 6:32 PM To: [EMAIL PROTECTED] Subject: easy query question I want to do a query that will find

RE: insert delayed and timestamps

2002-04-02 Thread Rick Emery
What happened when you tried this experiment? -Original Message- From: Viraj Alankar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 8:50 AM To: [EMAIL PROTECTED] Subject: insert delayed and timestamps Hello, When using 'insert delayed' syntax and there is a timestamp field in

RE: need some help...

2002-04-02 Thread Rick Emery
$retval = .= "  ". "- ".$a["title"].""; -Original Message- From: Alex Behrens [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 3:46 PM To: [EMAIL PROTECTED] Subject: need some help... Hey Guys, I need help indentifiying why I have an error in this line of syntax: while($a=

RE: copying field x to field y for each record in table

2002-04-03 Thread Rick Emery
UPDATE mytable SET field1=field2; -Original Message- From: Chuck Barnett [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 10:10 AM To: [EMAIL PROTECTED] Subject: copying field x to field y for each record in table Hi, how do I do the following: I have a table I have added a

RE: underline char in a [char][varchar][text] field ?

2002-04-03 Thread Rick Emery
if your app is PHP, then use stripslashes() on field -Original Message- From: Pal Lucian [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 10:58 AM To: [EMAIL PROTECTED] Subject: underline char in a [char][varchar][text] field ? Hello everybody, I have a problem inserting a t

RE: transactions, referntial integrity

2002-04-03 Thread Rick Emery
no stored procedures yet. maybe vers 4.1 -Original Message- From: Kevin D [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 12:59 PM To: [EMAIL PROTECTED] Subject: transactions, referntial integrity I've been reading the docs but I just want to verify. It seems like the latest

RE: BLOB in mysql

2002-04-03 Thread Rick Emery
look at the manual, section : 6.4.9 LOAD DATA INFILE Syntax LOAD DATA [LOW_PRIORITY | CONCURRENT] [LOCAL] INFILE 'file_name.txt' [REPLACE | IGNORE] INTO TABLE tbl_name [FIELDS [TERMINATED BY '\t'] [[OPTIONALLY] ENCLOSED BY ''] [ESCAPED BY '\\' ] ] [LIN

RE: help sorting by a column name

2002-04-03 Thread Rick Emery
$r = mysql_query("SELECT * FROM hwureviews ORDER BY category,num DESC"); what are you trying to do with this statement?: while ($info = mysql_fetch_row($max)) { -Original Message- From: Alex Behrens [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 4:08 PM To: [EMAIL PROTECTED

RE: Newbie table question

2002-04-04 Thread Rick Emery
delete from tableB; INSERT INTO tableB SELECT * FROM tableeA; see manual: 6.4.3.1 INSERT ... SELECT Syntax INSERT [LOW_PRIORITY] [IGNORE] [INTO] tbl_name [(column list)] SELECT ... -Original Message- From: Graham Nichols [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 9:44 AM T

RE: group by year

2002-04-04 Thread Rick Emery
GROUP BY is done on column value. show us you query -Original Message- From: Han de Neeling [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 7:15 AM To: [EMAIL PROTECTED] Subject: group by year I have a MySQL database containing records from several years. I want to calculate

RE: Getting the most recent record per id before date X

2002-04-04 Thread Rick Emery
SELECT * FROM mytable WHERE date_field mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 10:30 AM To: [EMAIL PROTECTED] Subject: Getting the most recent record per id before date X I am trying to figure out the best way to select the row of data for a specific id that is the most rece

RE: Query help

2002-04-04 Thread Rick Emery
SELECT * FROM mytable WHERE first_name=$first && last_name=$last -Original Message- From: Chuck Barnett [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 10:28 AM To: [EMAIL PROTECTED] Subject: Query help Hi. I have two fields, firstname, lastname. I populate a select box with

RE: Query help

2002-04-04 Thread Rick Emery
sult = mysql_query($query); -Original Message- From: Chuck Barnett [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 11:21 AM To: Rick Emery; [EMAIL PROTECTED] Subject: Re: Query help This will not work for my example. I have a select box that was populated from the db with firstname

RE: SQl query in MySQL (1)

2002-04-04 Thread Rick Emery
Use CHAR, not TEXT for Nombre and Password Also, INT will NOT be set to length of 1 in permiso -Original Message- From: Gastón Sancassano [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 12:10 PM To: [EMAIL PROTECTED] Subject: SQl query in MySQL (1) My name is Gastón Sancassano

RE: Not null not working??

2002-04-04 Thread Rick Emery
It is not inserting NULL. when $login is NULL or blank, then a a record, with emplogin equal to a string of zero characters is inserted, which is valid. A string with zero characters is NOT a NULL value. So, it is accepted. -Original Message- From: Andrew Hazen [mailto:[EMAIL PROTECTED

RE: Help. I have truly blundered.

2002-04-04 Thread Rick Emery
su as root then restart mysqld -Original Message- From: john [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 4:10 PM To: MySQL Lists Subject: Help. I have truly blundered. Please help with ignorance, I was in mysqld making some changes to a database. I run a Linux 6 box with M

RE: Escaped by 2 things?

2002-04-05 Thread Rick Emery
Since you are writing out the file, you must select which character to ESCAPE with. How would you expect mysql to choose? -Original Message- From: Cliff [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 11:46 PM To: [EMAIL PROTECTED] Subject: Escaped by 2 things? Short and simp

RE: Problems with UPDATE in v3.23.49 (is this a bug)

2002-04-05 Thread Rick Emery
No, this is NOT a bug. According to the manual (you read it, right?), TIMESTAMP is created so that when a record is UPDATEd or INSERTed, the time of the change is entered into the record. If you want a date that does not changem use the DATE fiel -Original Message- From: Hihn Jason [mai

RE: Problems with UPDATE in v3.23.49 (is this a bug)

2002-04-05 Thread Rick Emery
CTED]] Sent: Friday, April 05, 2002 10:48 AM To: 'Rick Emery' Subject: RE: Problems with UPDATE in v3.23.49 (is this a bug) Yes I did, but it is very long, and it was very long ago. Could someone please explain to me why this was done? It seems more confusing to do this than to not do t

MYSQL maximum query size?

2002-04-05 Thread Rick Emery
-Original Message- From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 4:02 PM To: [EMAIL PROTECTED] Subject: [PHP] MYSQL maximum query size? Is there a maximum number of characters you can use in a query? I have a giant query using the UPDATE command (updati

RE:

2002-04-08 Thread Rick Emery
SELECT name,birthday FROM mytable -Original Message- From: Chuck "PUP" Payne [mailto:[EMAIL PROTECTED]] Sent: Monday, April 08, 2002 10:49 AM To: MySQL Mailing List (E-mail) Subject: Ok, I know I am going to get yell about this but how can I do an SQL and only show to fields from a tab

RE: Help with Tables Please

2002-04-08 Thread Rick Emery
FieldID INT UNSIGNED DEFAULT '0' NOT NULL, -Original Message- From: Soheil Shaghaghi [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 07, 2002 11:10 PM To: [EMAIL PROTECTED] Subject: RE: Help with Tables Please Thanks for the tip Dan, I changed it, but it still gives me the same error.

RE: database setup

2002-04-08 Thread Rick Emery
First, I assume that the same value for "userlevel" may be used by multiple users. That is, multiple users can have userlevel equal to 1 or equal to 2 or 3 or whatever. Therefore, you CANNOT use userlevel as PRIMARY KEY. PRIMARY KEY is a UNIQUE identifier. Thus, I recommend that each user be id

RE: Strange behavior

2002-04-08 Thread Rick Emery
it worked for me: mysql> describe t_timesheet; ++---+--+-+-++ | Field | Type | Null | Key | Default | Extra | ++---+--+-+-++ | id | int(11) | | PRI | NULL|

RE: Problem with mysql

2001-02-27 Thread Rick Emery
I also have MySQL on Redhat 7. I don't have the problem you mention. I installed from RPM. You might try re-installing. rick -Original Message- From: Chris Hallgren [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 1:47 PM To: [EMAIL PROTECTED] Subject: Problem with mysql o

RE: ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)

2001-02-28 Thread Rick Emery
I had the same problem. Ensure that /var has these permissions: drwxr-xr-x Ensure /lib is drwxr-xr-x Ensure /mysql is drwxr-xr-x That fixed it for me rick -Original Message- From: andreas otto [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 6:11 AM To: [EMAIL PROTECTED

RE: Antwort: PHP and MySQL

2001-03-01 Thread Rick Emery
I hd this same problem. Ensure that /var, /var/lib, and /var/lib/mysql have permissions set to: drwxr-xr-x This cured the problem for me. rick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 6:19 AM To: Ben Kennish Cc: [EMAIL PROTECT

RE: PHP and MySQL

2001-03-01 Thread Rick Emery
I had the same problem. Ensure the permissions for /var, /var/lib, and /var/lib/mysql are set to: drwxr-xr-x -Original Message- From: Ben Kennish [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 4:56 AM To: [EMAIL PROTECTED] Subject: PHP and MySQL Who would've thought it woul

RE: Cant conect...

2001-03-02 Thread Rick Emery
I had the same problem. Ensure that /var, /var/lib, and /var/lib/mysql have permissions: drwxr-xr-x This should solve your problem for item 1. rick -Original Message- From: Paulus [mailto:[EMAIL PROTECTED]] Sent: Friday, March 02, 2001 4:09 PM To: [EMAIL PROTECTED] Subject: Cant conec

RE: load_file

2001-03-07 Thread Rick Emery
Here is a tutorial that might help you. Go to http://www.weberdev.com. Click on: (Articles and Tutorials)->(PHP)->(HTTP)->(Uploading files to the server with PHP) -Original Message- From: Hesham Anan [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 06, 2001 10:54 AM To: mysql Subject: loa

RE: Beginner Help, can't get it started, but did in the past

2001-03-07 Thread Rick Emery
I also did a fresh install of RH 7.0 with the mysql RPMS from the CD-ROMs. The files installed correctly, including the RPMs; therefore, those are NOT the problem. There is no separate "data directory". Those are labelled "test" and "mysql". As you create additional databases, those directories

RE: Can't start the server

2001-03-09 Thread Rick Emery
You may have a permissions problem. I had the same error. Ensure that /var, /var/lib, and /var/lib/mysql have the following permissions: drwxr-xr-x then restart the client. rick -Original Message- From: Omaro A [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 08, 2001 8:25 PM To: [EM

RE: Free Hosting

2001-03-09 Thread Rick Emery
Another alternative is: http://www.intercession.net/specialoffers That site provides Apache/PHP (3.0.7)/MySQL for $60 per year. Just keep clicking through the links to get to the price list. -Original Message- From: Cally [mailto:[EMAIL PROTECTED]] Sent: Friday, March 09, 2001 12:10 AM

RE: PHP and MySQL

2001-03-09 Thread Rick Emery
I had this same problem. I could connect via the mysql client if I was ROOT, but not otherwise. You may have a permissions problem. Ensure that /var, /var/lib, and /var/lib/mysql are set to: drwxr-xr-x That cured it for me. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROT

RE: RH7 Mysql rpm intsallation problem

2001-03-21 Thread Rick Emery
Ensure that /var, /var/lib, /var/lib/mysql have the following permissions: drwxr-xr-x -Original Message- From: Jason Baigent [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 20, 2001 8:31 PM To: [EMAIL PROTECTED] Subject: RH7 Mysql rpm intsallation problem Hi, I'm trying to install RH7(

RE: selecting null values

2001-03-21 Thread Rick Emery
use: SELECT * FROM table WHERE title IS NULL LIMIT 1; -Original Message- From: Peter Szekszardi [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 21, 2001 7:36 AM To: [EMAIL PROTECTED] Subject: selecting null values Hi, I have a database which has a text field (let's name it title).

RE: Can't connect server through socket /var/lib/mysql/mysql.sock(111)

2001-03-21 Thread Rick Emery
I know you deleted /var/lib/mysql/mysql.sock. If you have to re-install, ensure that /var, /var/lib/, /var/lib/mysql have these permissions: drwxr-xr-x. I previously got the same error you did and corrected it by setting the above permissions. -Original Message- From: denis mettler [mai

RE: mysql error

2001-03-21 Thread Rick Emery
What is the error message? Ensure /var, /var/lib, /var/lib/mysql have these permissions: drwxr-xr-x -Original Message- From: webmaster [mailto:[EMAIL PROTECTED]] Sent: Monday, March 19, 2001 2:56 PM To: [EMAIL PROTECTED] Subject: mysql error I have suse linux 7.1, I installed mysql an

RE: inserting into mysql database in linux using C

2001-03-26 Thread Rick Emery
Maybe you just gave a snippet, but I don't see where you established the connection to the database, thereby giving the variable "connection" a value. It appears to be undefined. Therefore, the mysql_query() would fail. -Original Message- From: john lin [mailto:[EMAIL PROTECTED]] Sent:

RE: RTFM (was: *sigh* Re: Is it a bug? )

2001-03-26 Thread Rick Emery
This list should be open to ALL questions, newbie and non-newbie. If we start filtering, or slamming, then folks will be hesitant to ask questions. We should encourage the learning process, not discourage. And where better to learn than from this list? -Original Message- From: Oson, C

  1   2   3   >