RE: Ideas on creating connections

2003-09-25 Thread Roger Davis
Although I would love to share the code for this recordset, unfortunately,
it is not completely ready for dissemination at this time.  At some time in
the future, I will release it under a GPL license but there is still quite a
bit of work.

I use recordset in the vaguest of terms as it somewhat acts as a recordset
within VB.  There is however no control binding and at the moment, you have
to have a table with an auto_increment column for updating.  Also, it is a
per connection recordset, so every instance of the recordset creates a new
connection to the server.  (This is the part I am working on now, as it
definately needs updating).

Roger

> -Original Message-
> From: Director General: NEFACOMP [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 25, 2003 1:41 PM
> To: Roger Davis; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: Ideas on creating connections
>
>
> Thank you for your time.
> I don't want to be too much demanding.
>
> I currently have a problem with MyODBC 3.51.
> When my client machine is set to use French numbers (with a COMMA
> instead of
> a PERIOD or DOT for floats), MyODBC does not let the decimal part to pass.
> Venu told me he will try to look into this before the next
> release. It seems
> I am impatient!!!
>
> You said you are trying to move from DAO to using the MySQL DLL
> (libmysql.dll).
> Can we share some code using VB and the DLL?
>
> Just send me a piece of code doing the following:
> =
> - Creating a connection to the MySQL server,
> - Running a DELETE query on the server (or any other query that
> doesn't need
> to return values)
> - Running a SELECT query against the MySQL server and
> - Populating data of the RecordSet creating into a Flex grid
> - Closing and Distroying the RecordSet
> - Closing and Distroying the Connection
> =
> One time I saw such a code on http://www.vbmysql.com but it seems to have
> dissappeared.
>
>
> Thanks
> Emery
> - Original Message -
> From: "Roger Davis" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, September 25, 2003 19:08
> Subject: RE: Ideas on creating connections
>
>
> > DAO is, I guess you would say, the predessor to ADO.  I am currently in
> the
> > process of getting rid of all the DAO code in the application and moving
> to
> > a custom recordset using the libmysql.dll.  Some of this is
> done in VB and
> > it is still extremely fast for a VB based recordset.  Although there are
> > numerous ways to do this, it is really difficult to tell what
> would be the
> > best in your situation.  As has been mentioned before, if you are doing
> > queries one after another in your application, then by all means connect
> > once and pass all the queries through that connection.  If you a making
> very
> > few queries and you have limited resources on the server, then
> it would be
> > best to connect only when you need to and drop the connection
> when you are
> > done.  These are of course only my opinions based on what I have
> experienced
> > in the past.  Your experience may vary. Void where prohibited.
> >
> > Roger
> >
> > > -Original Message-
> > > From: Director General: NEFACOMP [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, September 25, 2003 12:48 PM
> > > To: Roger Davis; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > > Subject: Re: Ideas on creating connections
> > >
> > >
> > > I never use DAO.
> > >
> > > Is there any benefit over ADO?
> > >
> > >
> > > Thanks
> > > Emery
> > > - Original Message -
> > > From: "Roger Davis" <[EMAIL PROTECTED]>
> > > To: "Director General: NEFACOMP" <[EMAIL PROTECTED]>;
> > > <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > > Sent: Thursday, September 25, 2003 18:14
> > > Subject: RE: Ideas on creating connections
> > >
> > >
> > > > My experience is this.  I use DAO through MyODBC, and I also use the
> > > > libmysql.dll with a custom recordset.  Connection times through both

> > > options
> > > > are extremely fast. Fast enough in my situation that it can
> > > basically can
> > > be
> > > > ignored.  There are times when I open several connections to
> > > the server at
> > > > once and have yet to run into any problems.  If you strictly want to
> use
> > > ADO
> > > > though, I would suggest that you open one connection to the
> server and
> > > > pr

RE: Ideas on creating connections

2003-09-25 Thread Roger Davis
DAO is, I guess you would say, the predessor to ADO.  I am currently in the
process of getting rid of all the DAO code in the application and moving to
a custom recordset using the libmysql.dll.  Some of this is done in VB and
it is still extremely fast for a VB based recordset.  Although there are
numerous ways to do this, it is really difficult to tell what would be the
best in your situation.  As has been mentioned before, if you are doing
queries one after another in your application, then by all means connect
once and pass all the queries through that connection.  If you a making very
few queries and you have limited resources on the server, then it would be
best to connect only when you need to and drop the connection when you are
done.  These are of course only my opinions based on what I have experienced
in the past.  Your experience may vary. Void where prohibited.

Roger

> -Original Message-
> From: Director General: NEFACOMP [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 25, 2003 12:48 PM
> To: Roger Davis; [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: Ideas on creating connections
>
>
> I never use DAO.
>
> Is there any benefit over ADO?
>
>
> Thanks
> Emery
> - Original Message -
> From: "Roger Davis" <[EMAIL PROTECTED]>
> To: "Director General: NEFACOMP" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, September 25, 2003 18:14
> Subject: RE: Ideas on creating connections
>
>
> > My experience is this.  I use DAO through MyODBC, and I also use the
> > libmysql.dll with a custom recordset.  Connection times through both
> options
> > are extremely fast. Fast enough in my situation that it can
> basically can
> be
> > ignored.  There are times when I open several connections to
> the server at
> > once and have yet to run into any problems.  If you strictly want to use
> ADO
> > though, I would suggest that you open one connection to the server and
> > process your queries through that connection.  Leave it open
> for the life
> of
> > the program.  While the program is open, the connection to the
> server will
> > stay open and the thread for MySQL will be a "sleep".
> >
> > Just my $0.02.
> >
> > Roger
> > > -Original Message-
> > > From: Director General: NEFACOMP [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, September 25, 2003 11:57 AM
> > > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > > Subject: Ideas on creating connections
> > >
> > >
> > > Hi groups,
> > >
> > > I need some experienced users to guide me on this issue.
> > > I am developping an Application that will be accessing a MySQL
> > > database through MyODBC.
> > > The application is developped using Visual Basic.
> > >
> > > Since my application will be used simultaneously by more than 200
> > > users, I want to know the implication of using one of the
> > > following methods for connecting to the server:
> > >
> > > 1. At logon, I create a connection to the server and maintain it
> > > throught the application life. By the application life I mean
> > > that the connection stays open as long as the application is
> > > loaded in the memory. So, for a user who is online for 3 hours,
> > > the connection is on for those three hours, even if the user goes
> > > out for a coffee.
> > >
> > > 2. I create a connection only when a query is about to be sent to
> > > the server. That means, I create a connection when I want to
> > > create an ADO recordset and run a query against the server. After
> > > running my query, I distroy the connection.
> > >
> > >
> > > Currently I am using the first option since I don't exactly what
> > > it is required (time and resources) to make a connection to the
> > > server. Will you please tell me how fast is to connect to the
> > > server. If you advise me that this method is the best, I will add
> > > functions to reconnect a dead connection.
> > >
> > >
> > > Any ideas and advices are highly welcomed
> > >
> > >
> > > Thanks,
> > > __
> > > NZEYIMANA Emery Fabrice
> > > NEFA Computing Services, Inc.
> > > P.O. Box 5078 Kigali
> > > Office Phone: +250-51 11 06
> > > Office Fax: +250-50 15 19
> > > Mobile: +250-08517768
> > > Email: [EMAIL PROTECTED]
> > > http://www.nefacomp.net/
> > >
> > > ---
> &

RE: Ideas on creating connections

2003-09-25 Thread Roger Davis
My experience is this.  I use DAO through MyODBC, and I also use the
libmysql.dll with a custom recordset.  Connection times through both options
are extremely fast. Fast enough in my situation that it can basically can be
ignored.  There are times when I open several connections to the server at
once and have yet to run into any problems.  If you strictly want to use ADO
though, I would suggest that you open one connection to the server and
process your queries through that connection.  Leave it open for the life of
the program.  While the program is open, the connection to the server will
stay open and the thread for MySQL will be a "sleep".

Just my $0.02.

Roger
> -Original Message-
> From: Director General: NEFACOMP [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 25, 2003 11:57 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Ideas on creating connections
>
>
> Hi groups,
>
> I need some experienced users to guide me on this issue.
> I am developping an Application that will be accessing a MySQL
> database through MyODBC.
> The application is developped using Visual Basic.
>
> Since my application will be used simultaneously by more than 200
> users, I want to know the implication of using one of the
> following methods for connecting to the server:
>
> 1. At logon, I create a connection to the server and maintain it
> throught the application life. By the application life I mean
> that the connection stays open as long as the application is
> loaded in the memory. So, for a user who is online for 3 hours,
> the connection is on for those three hours, even if the user goes
> out for a coffee.
>
> 2. I create a connection only when a query is about to be sent to
> the server. That means, I create a connection when I want to
> create an ADO recordset and run a query against the server. After
> running my query, I distroy the connection.
>
>
> Currently I am using the first option since I don't exactly what
> it is required (time and resources) to make a connection to the
> server. Will you please tell me how fast is to connect to the
> server. If you advise me that this method is the best, I will add
> functions to reconnect a dead connection.
>
>
> Any ideas and advices are highly welcomed
>
>
> Thanks,
> __
> NZEYIMANA Emery Fabrice
> NEFA Computing Services, Inc.
> P.O. Box 5078 Kigali
> Office Phone: +250-51 11 06
> Office Fax: +250-50 15 19
> Mobile: +250-08517768
> Email: [EMAIL PROTECTED]
> http://www.nefacomp.net/
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.520 / Virus Database: 318 - Release Date: 9/18/2003
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.520 / Virus Database: 318 - Release Date: 9/18/2003


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: SELECT only unique records

2003-09-12 Thread Roger Davis
Try

SELECT DISTINCT state_ID FROM financial_master WHERE category_ID = '1'

Roger

> -Original Message-
> From: Comcast [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 12, 2003 2:03 PM
> To: [EMAIL PROTECTED]
> Subject: SELECT only unique records
> 
> 
> I am sure this is a slam-dunk, but I am new to this and stumped 
> ... thanks.
> I have the following statement, but I need it to pull only unique 
> listings - I get repeated items.
> 
> SELECT state_ID FROM financial_master WHERE category_ID = '1'
> 
> 
> 
> 
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/2003
> 
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/2003


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Help with the "IN" operator

2003-09-06 Thread Roger Davis
I am having a bit of trouble with the "IN" operator.  I am thinking that it
just may be my misunderstanding.

Situation.
I have a table (ZipCounty) that I want to pull vendors from based on
zipcode.  So I have a Vendor like field declared as TEXT.  To keep the table
up to date, I issuse updates in the manor of...

 UPDATE ZipCounty SET VendorLink = IF(VendorLink IS
NULL,'528',CONCAT(VendorLink,',528')) WHERE State = 'CA' AND 528 NOT IN
(VendorLink);

Where 528 would be the ID of that particular vendor.  These updates work
fine, but later if I need to do another update, say to remove 528 from the
VendorLink field, I can find all of the the records where 528 is the only
number in the field, or if it is the first number in the field, but not if
it is the last number in the field.

Hope someone can help me out.

Roger

Here are a few selects

mysql> SELECT Count(ID) FROM ZipCounty WHERE VendorLink = '529,528';
+---+
| Count(ID) |
+---+
|  1384 |
+---+
1 row in set (0.25 sec)

mysql> SELECT Count(ID) FROM ZipCounty WHERE '528' IN (VendorLink);
+---+
| Count(ID) |
+---+
| 0 |
+---+
1 row in set (0.25 sec)

mysql> SELECT VendorLink, Count(ID) FROM ZipCounty WHERE VendorLink IS NOT
NULL GROUP BY VendorLink;
++---+
| VendorLink | Count(ID) |
++---+
| 529|  3844 |
| 529,528|  1384 |
++---+
2 rows in set (0.61 sec)

Why do I get a count of 0 for the Second Query?


Here is a list of all the queries and output. (redhat 9.0 version 2.23.54)

This also happens on the latest Windows version (mysql  Ver 12.21 Distrib
4.0.14, for Win95/Win98 (i32))


mysql> \s
--
mysql  Ver 11.18 Distrib 3.23.54, for redhat-linux-gnu (i386)

Connection id:  59756
Current database:   TPZ
Current user:   [EMAIL PROTECTED]
Current pager:  stdout
Using outfile:  ''
Server version: 3.23.54
Protocol version:   10
Connection: Localhost via UNIX socket
Client characterset:latin1
Server characterset:latin1
UNIX socket:/var/lib/mysql/mysql.sock
Uptime: 12 days 19 hours 38 min 36 sec

Threads: 2  Questions: 2354432  Slow queries: 43  Opens: 143  Flush tables:
1  Open tables: 64 Queries per second avg: 2.126
--

mysql> SHOW CREATE TABLE ZipCounty;
+---+---




+
| Table | Create Table
|
+---+---




+
| ZipCounty | CREATE TABLE `ZipCounty` (
  `ID` int(11) NOT NULL auto_increment,
  `City` varchar(50) default NULL,
  `State` char(2) default NULL,
  `Zip` varchar(10) default NULL,
  `AreaCode` char(3) default NULL,
  `County` varchar(50) default NULL,
  `VendorLink` text,
  `OtherLink` text,
  PRIMARY KEY  (`ID`),
  KEY `Zip` (`Zip`),
  KEY `County` (`County`),
  KEY `State` (`State`)
) TYPE=MyISAM |
+---+---




+
1 row in set (0.00 sec)

mysql> UPDATE ZipCounty SET VendorLink = NULL;
Query OK, 11193 rows affected (0.99 sec)
Rows matched: 69802  Changed: 11193  Warnings: 0

mysql> UPDATE ZipCounty SET VendorLink = IF(VendorLink IS
NULL,'529',CONCAT(VendorLink,',529')) WHERE State = 'AL' AND 529 NOT IN
(VendorLink);
Query OK, 1312 rows affected (0.08 sec)
Rows matched: 1312  Changed: 1312  Warnings: 0

mysql> UPDATE ZipCounty SET VendorLink = IF(VendorLink IS
NULL,'529',CONCAT(VendorLink,',529')) WHERE State = 'AR' AND 529 NOT IN
(VendorLink);
Query OK, 1313 rows affected (0.07 sec)
Rows matched: 1313  Changed: 1313  Warnings: 0

mysql> UPDATE ZipCounty SET VendorLink = IF(VendorLink IS
NULL,'529',CONCAT(VendorLink,',529')) WHERE County = 'Kent' AND State = 'DE'
AND 529 NOT IN (VendorLink);
Query OK, 30 rows affected (0.00 sec)
Rows matched: 30  Changed: 30  Warnings: 0

mysql> UPDATE ZipCounty SET VendorLink = IF(Vendor

RE: Quick ones to speed up acces!

2003-08-14 Thread Roger Davis
MySQL does not use an index when you do "%blah%".  It would use the index
for "blah%" however. See the following reference.

http://www.mysql.com/doc/en/MySQL_indexes.html

I would suggest you alter your tables to use a FullText Search.

http://www.mysql.com/doc/en/Fulltext_Search.html

Roger

> -Original Message-
> From: Binay Agarwal [mailto:[EMAIL PROTECTED]
> Sent: Sunday, August 10, 2003 7:53 PM
> To: Roger Davis; [EMAIL PROTECTED]
> Subject: Re: Quick ones to speed up acces!
>
>
> Thanks Roger for quick response.
>
> Herebelow the structure of my table and query.
>
> CREATE TABLE npg_search (
>sno int(11) NOT NULL auto_increment,
>fileid varchar(255) NOT NULL,
>caption text,
>headline varchar(255),
>specialins varchar(255),
>keywords varchar(255) NOT NULL,
>cat varchar(50) NOT NULL,
>byline varchar(255),
>credit varchar(255),
>source varchar(255),
>date date,
>city varchar(100),
>state varchar(100),
>country varchar(100) NOT NULL,
>orgtransref varchar(100),
>copyright varchar(255),
>extratxt text,
>prints tinyint(4),
>extrastr varchar(255),
>bylinetitle varchar(255),
>addedon timestamp(14),
>PRIMARY KEY (sno),
>INDEX (fileid, keywords, cat, country));
>
> As shown columns fileid,keywords,cat and country are indexed.
>
> Query is:
>
> Select * from table where keywords like '%blah%' or caption like '%blah%'
> or headline like '%blah%'  or cat like '%blah%'
>
> Please help me out.
>
> Binay
>
>
> - Original Message -
> From: "Roger Davis" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, August 11, 2003 4:57 PM
> Subject: RE: Quick ones to speed up acces!
>
>
> > It's called indexing and your queries should return in under 1
> sec unless
> > you are pulling all your records and all your data.  Show us
> your Queries
> > and you table structure and I am sure we can help.
> >
> > Roger
> >
> > > -Original Message-
> > > From: Binay Agarwal [mailto:[EMAIL PROTECTED]
> > > Sent: Sunday, August 10, 2003 7:08 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Quick ones to speed up acces!
> > >
> > >
> > > Hi everybody!
> > >
> > > I am querying from a table containing more than 40,000 records.
> > > Earlier when the records were 10,000 it was taking 9 sec and now
> > > after 1 year and 40,000 records its taking 30 sec. Code is the same.
> > >
> > > I am pretty sure that it has something to do with database only.
> > > No body can think of spending 30 secs for retrieving values from
> > > tables unless it's very huge in the sense of millions of records.
> > >
> > > I don know whether I have to modify my database or do some sort
> > > of restructuring or reindexing so as to make it fast enough.
> > >
> > > Is there some methods or optmization which can be applied to this
> > > database which hasn't been touched since design to enhance the spped.
> > >
> > > If there are some quick ones but valued alottt please let me know.
> > >
> > >
> > > Thanks in advance
> > >
> > > Binay
> > >
> > > ---
> > > Incoming mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.507 / Virus Database: 304 - Release Date: 8/4/2003
> > >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.507 / Virus Database: 304 - Release Date: 8/4/2003
> >
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
> >
> >
>
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.507 / Virus Database: 304 - Release Date: 8/4/2003
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.507 / Virus Database: 304 - Release Date: 8/4/2003


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Quick ones to speed up acces!

2003-08-14 Thread Roger Davis
It's called indexing and your queries should return in under 1 sec unless
you are pulling all your records and all your data.  Show us your Queries
and you table structure and I am sure we can help.

Roger

> -Original Message-
> From: Binay Agarwal [mailto:[EMAIL PROTECTED]
> Sent: Sunday, August 10, 2003 7:08 PM
> To: [EMAIL PROTECTED]
> Subject: Quick ones to speed up acces!
>
>
> Hi everybody!
>
> I am querying from a table containing more than 40,000 records.
> Earlier when the records were 10,000 it was taking 9 sec and now
> after 1 year and 40,000 records its taking 30 sec. Code is the same.
>
> I am pretty sure that it has something to do with database only.
> No body can think of spending 30 secs for retrieving values from
> tables unless it's very huge in the sense of millions of records.
>
> I don know whether I have to modify my database or do some sort
> of restructuring or reindexing so as to make it fast enough.
>
> Is there some methods or optmization which can be applied to this
> database which hasn't been touched since design to enhance the spped.
>
> If there are some quick ones but valued alottt please let me know.
>
>
> Thanks in advance
>
> Binay
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.507 / Virus Database: 304 - Release Date: 8/4/2003
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.507 / Virus Database: 304 - Release Date: 8/4/2003


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Replication Issue?

2003-07-31 Thread Roger Davis
Hi all,
   My slave has been working fine up until now.  Here is the error message.

030730 11:32:28  Slave: connected to master '[EMAIL PROTECTED]:3306',
replication started in log 'SQLServer1-bin.034' at position 77571524
ERROR: 1062  Duplicate entry '120816' for key 1
030730 11:32:28  Slave:  error running query 'INSERT INTO Assignments (
.

Key 1 is CaseID

Database changed
mysql> select CaseID from Assignments Order by CaseID DESC Limit 3;
++
| CaseID |
++
| 120815 |
| 120814 |
| 120813 |
++
3 rows in set (0.02 sec)

mysql> DELETE FROM Assignments WHERE CaseID = 120816;
Query OK, 0 rows affected (0.04 sec)

If I try to restart the slave I get the error all over again.

Anyone have any Ideas


Roger
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.504 / Virus Database: 302 - Release Date: 7/24/2003


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Root@?

2003-07-08 Thread Roger Davis
Paul,
Your probably right about him running on windows, but I have also seen this
in other situations running linux.  In fact, and yes I am almost ashamed to
say, I even set one up this way in my earlier days. It was on a local
network with no internet, and the "users" were on a custom app connecting
through libmysql.dll.  I know, not the smartest thing to do but the "users"
had no Idea about computers and probabaly didn't even know there was a DB
server.  So let the tongue lashing commence.

Roger

> -Original Message-
> From: Paul DuBois [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 08, 2003 10:02 PM
> To: Roger Davis; [EMAIL PROTECTED]
> Subject: RE: [EMAIL PROTECTED]
>
>
> At 21:17 -0400 7/8/03, Roger Davis wrote:
> >localhost does not mean 127.0.0.1  Localhost is the socket to
> connect to and
> >has is separate from IP addresses.  The % is for IP address
> access.  That is
> >why there are 2 ways.  I would hardly call that redundant.
> >
> >Roger
>
> That's true on Unix, but if Jim (the original poster) has entries
> for [EMAIL PROTECTED] and [EMAIL PROTECTED], then he's probably running on Windows,
> and Unix sockets are irrelevant.  localhost can be used for named pipe
> connections, though: the [EMAIL PROTECTED] entry will work for that,
> whereas [EMAIL PROTECTED] will not.
>
> Note too that because [EMAIL PROTECTED] allows access to any remote host anywhere,
> it's particularly important to make sure either that that account has
> a password or that you remove it.  Otherwise your server is wide open.
>
>
>
> >
> >>  -Original Message-
> >>  From: Joel Rees [mailto:[EMAIL PROTECTED]
> >>  Sent: Tuesday, July 08, 2003 8:30 PM
> >>  To: [EMAIL PROTECTED]
> >>  Subject: Re: [EMAIL PROTECTED]
> >>
> >>
> >>  > Not sure where these came from, but in my users I've got a
> >>  [EMAIL PROTECTED] and a
> >>  > [EMAIL PROTECTED]  Is this redundant, or is there a reason for this?
> >>
> >>  Well, some people might say it's redundant, but it _is_ by design --
> >>
> >>  http://www.mysql.com/doc/en/Privileges.html
> >>
> >>  > ...
> >>
> >>  --
> >>  Joel Rees, programmer, Kansai Systems Group
> >>  Altech Corporation (Alpsgiken), Osaka, Japan
> >  > http://www.alpsgiken.co.jp
>
>
> --
> Paul DuBois, Senior Technical Writer
> Madison, Wisconsin, USA
> MySQL AB, www.mysql.com
>
> Are you MySQL certified?  http://www.mysql.com/certification/
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.497 / Virus Database: 296 - Release Date: 7/4/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.497 / Virus Database: 296 - Release Date: 7/4/2003


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Root@?

2003-07-08 Thread Roger Davis
From: http://www.mysql.com/doc/en/Can_not_connect_to_server.html

"A MySQL client on Unix can connect to the mysqld server in two different
ways: Unix sockets, which connect through a file in the file system (default
`/tmp/mysqld.sock') or TCP/IP, which connects through a port number. Unix
sockets are faster than TCP/IP but can only be used when connecting to a
server on the same computer. Unix sockets are used if you don't specify a
hostname or if you specify the special hostname localhost."

So it means, from the machine's console.

1. mysql -h localhost -p   (means connect to the mysql server through the
socket file)
2. mysql -p   (means connect to the mysql server through the socket file)
3. mysql -h 127.0.0.1 -p   (means connect to the mysql server through the IP
Port)
4. mysql -h 192.168.0.1 -p   (means connect to the mysql server through the
IP Port)

1 & 2 you need privileges like [EMAIL PROTECTED]
3 you need privileges like [EMAIL PROTECTED] or [EMAIL PROTECTED]
4 you need privileges like [EMAIL PROTECTED] or [EMAIL PROTECTED]

Hope this helps
Roger

> -Original Message-
> From: Jim McAtee [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 08, 2003 9:27 PM
> To: Roger Davis; [EMAIL PROTECTED]
> Subject: Re: [EMAIL PROTECTED]
>
>
> Roger Davis wrote:
>
> > localhost does not mean 127.0.0.1  Localhost is the socket to
> connect to and
> > has is separate from IP addresses.
>
> Does this mean from the machine's console, or something else?
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.497 / Virus Database: 296 - Release Date: 7/4/2003
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.497 / Virus Database: 296 - Release Date: 7/4/2003


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Root@?

2003-07-08 Thread Roger Davis
localhost does not mean 127.0.0.1  Localhost is the socket to connect to and
has is separate from IP addresses.  The % is for IP address access.  That is
why there are 2 ways.  I would hardly call that redundant.

Roger

> -Original Message-
> From: Joel Rees [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 08, 2003 8:30 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [EMAIL PROTECTED]
>
>
> > Not sure where these came from, but in my users I've got a
> [EMAIL PROTECTED] and a
> > [EMAIL PROTECTED]  Is this redundant, or is there a reason for this?
>
> Well, some people might say it's redundant, but it _is_ by design --
>
> http://www.mysql.com/doc/en/Privileges.html
>
> > ...
>
> --
> Joel Rees, programmer, Kansai Systems Group
> Altech Corporation (Alpsgiken), Osaka, Japan
> http://www.alpsgiken.co.jp
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.497 / Virus Database: 296 - Release Date: 7/4/2003
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.497 / Virus Database: 296 - Release Date: 7/4/2003


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: How can I get the number of entries retrieved by a "SELECT - FROM"

2003-06-12 Thread Roger Davis
Change you SQL statement as follows.

"SELECT Count(*) as Cnt FROM"

Then use "Cnt" as your "variable" like you would "h_id"

Roger. 

> -Original Message-
> From: ed anderson [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 12, 2003 5:58 PM
> To: [EMAIL PROTECTED]
> Subject: How can I get the number of entries retrieved by a "SELECT -
> FROM"
> 
> 
> Dell 4500, mem 1g, disk 45g, mhz 2g, Mysql-3.23.54a-linux-i686, PHP-4.30,
> httpd_2.0.44
> 
> 
> 
> 1. How do I trap or collect or save the digit "3" generated the
>mysql "SELECT COUNT(*)" statement below? 
>
> 2. The PHP "SELECT FROM" below (before snip) listed the expected data.
>Is there a way to get the digit "3" into a PHP variable?
> 
> SELECT h_id, name FROM tbtm # displays
>   WHERE h_id="1"# three
>  OR h_id="2"   # lines
>  OR h_id="3";  # of data
> 
> SELECT COUNT(*) FROM tbtm   # displays
>   WHERE h_id='1'# the
>  OR h_id='2'# digit
>  OR h_id='3';   # three
> 
> +--+
> | COUNT(*) |
> +--+
> |3 |
> +--+
> 1 row in set (0.00 sec)
> 
> 
> 
>  The next PHP is the same as the "SELECT FROM" above.
>   $result = mysql_query(" SELECT h_id, name, FROM tbtm
>   WHERE h_id='1'
>  OR h_id='2'
>  OR h_id='3'",
>  $tmtb_db);
> #
>  printf("ID: %s\n",  mysql_result($result,1,"h_id"));
>  printf("name: %s\n",mysql_result($result,1,"name")); 
> 
> #
> ?>
> 
> 
> Thanks
> 
> [EMAIL PROTECTED]
> 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
> 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Help with Proper SQL to Limit number of rows

2003-04-02 Thread Roger Davis
Jeff,
Thaks for the reply, let me sum up.  Normal order if by CaseID,  However,
we have a need to order it by FileNumber (Keeps all the Assignments for One
person together).  Assignments for one person may come in over the course of
Months so I can't order it by CaseID.  The reason I want to do a LIMIT when
I search for a FileNumber is to have the ability to move forward and
backwards in the Recordset.  So, What I would like to do is have the ability
to move back/forward a record at a time.  At the moment, this means
retrieving all of the CaseID's.  The other headache about this, is since I
am retrieving all of the CaseID's it does not use the index.  So my best
solution is to retrieve 10-100 CaseID's before the position I jump into, and
10-100 after.  So the solution on pulling 10 after with a LIMIT Clause is
great.  But How do I pull the list of 10 before?

Or if someone has a better solution I would love to  here it.

Roger

-Original Message-
From: Jeff Kilbride [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 3:18 AM
To: Roger Davis; [EMAIL PROTECTED]
Subject: Re: Help with Proper SQL to Limit number of rows


Hi Roger,

> Quick rundown.
>
> Table:
>
> Assignments
> CaseID auto_increment
> FileNumber char(18)
> FirstName char(20)
> LastName char(20)
> and on and on and on
> Indexes on
> CaseID (Primary)
> FileNumber
> Name (LastName, FirstName)
>
> What I would like to do is something along the lines of
>
> SELECT CaseID FROM Assignments WHERE FileNumber = '111-2332-12232-299'
ORDER
> BY FileNumber;

My first question is: why are you ordering by FileNumber when you are
specifying a FileNumber in the WHERE clause? All FileNumbers for all records
selected will be the same, won't they? (is this supposed to be ORDER BY
CaseID?)

> But I want to pull up the previous 10 and next 10 Cases (Loading the list
of
> CaseID's is starting to slow down the program).  I looked at LIMIT but
don't
> know how to use that to do what I want.

Using the LIMIT clause is actually pretty easy. To select the first 10
records:

SELECT CaseID FROM Assignments WHERE FileNumber = '111-2332-12232-299' ORDER
BY FileNumber LIMIT 0, 10

The first number in the LIMIT clause is the offset and the second number is
the number of records to return. So, to select the second group of 10
records:

SELECT CaseID FROM Assignments WHERE FileNumber = '111-2332-12232-299' ORDER
BY FileNumber LIMIT 10, 10

This just says "start at record 10 and give me the next 10 records". 3rd
group:

SELECT CaseID FROM Assignments WHERE FileNumber = '111-2332-12232-299' ORDER
BY FileNumber LIMIT 20, 10

"start at record 20 and give me the next 10 records", etc...  So, in your
code you can use something like a page number to figure out the offset you
need -- hence the reason this is usually called "paging". You should use
(page number - 1) * (number of records on each page) -- in your case, page 1
would give offset 0, page 2 offset 10, page 3 offset 20, etc... If this is a
web page, the page number can be sent to your script via a POST/GET
variable. Hope this helps.

Thanks,
--jeff

> Failing that, I would like to be able to do something along the lines of
>
> SELECT NEXT CaseID FROM Assignments .
>
> After the initial pull.
>
> Any help/suggestions would be greatly appreciated.
>
> Thanx
> Roger
>
> SQL/MYSQL
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
>


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Help with Proper SQL to Limit number of rows

2003-03-31 Thread Roger Davis
Quick rundown.

Table:

Assignments
CaseID auto_increment
FileNumber char(18)
FirstName char(20)
LastName char(20)
and on and on and on
Indexes on
CaseID (Primary)
FileNumber
Name (LastName, FirstName)

What I would like to do is something along the lines of

SELECT CaseID FROM Assignments WHERE FileNumber = '111-2332-12232-299' ORDER
BY FileNumber;

But I want to pull up the previous 10 and next 10 Cases (Loading the list of
CaseID's is starting to slow down the program).  I looked at LIMIT but don't
know how to use that to do what I want.

Failing that, I would like to be able to do something along the lines of

SELECT NEXT CaseID FROM Assignments .

After the initial pull.

Any help/suggestions would be greatly appreciated.

Thanx
Roger

SQL/MYSQL


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: BEGINNER QUESTION.

2003-03-24 Thread Roger Davis
USE hitcounter;
ALTER TABLE info DROP count;

Hope this helps
Roger

-Original Message-
From: Wileynet [mailto:[EMAIL PROTECTED]
Sent: Monday, March 24, 2003 8:27 PM
To: [EMAIL PROTECTED]
Subject: BEGINNER QUESTION.


I have looked everywhere online, books.
I simply would like to DELETE a FIELD from the command line.

I have a database called hitcounter.
Inside hitcounter I have one table with 3 fields.

I've tried...
DELETE FROM info FIELD count;
ALTER info DELETE count;
DROP count;

Can someone please tell me how to do this, OR do you have to DROP the
database and start over 


-thank you in advance
Wiley




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: CREATE syntax wrong?

2003-03-24 Thread Roger Davis

Try changing this...
  category_id NUMERIC NOT NULL AUTO_INCREMENT,
to this...
  category_id INT NOT NULL AUTO_INCREMENT,

or MEDIUMINT/BIGINT if you need that much.

The INT type is the only type to accept an auto_increment qualifier.

http://www.mysql.com/doc/en/CREATE_TABLE.html

Hope this helps
Roger
-Original Message-
From: Cesar Baquerizo [mailto:[EMAIL PROTECTED]
Sent: Monday, March 24, 2003 3:59 PM
To: MySQL
Subject: CREATE syntax wrong?


Hello,

I am on:

mysql  Ver 11.18 Distrib 3.23.54, for pc-linux (i686)


Is there any reason the following should not work:

CREATE TABLE category
(
  category_id NUMERIC NOT NULL AUTO_INCREMENT,
  category_name VARCHAR(40),
  description VARCHAR(80),
  PRIMARY KEY (category_id)
) TYPE=MyISAM;

I get this:

ERROR 1063 at line xx: Incorrect column specifier for column
'category_id'


-- 

---
Cesar Baquerizo
Off. - 718.343.0829
Fax. - 718.343.3111
Cell - 917.685.8447



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: sql,query

2003-03-21 Thread Roger Davis

not really for mhsql list, more for php list but,,,
select your database after connection.
use echo statement to look at you queries.
check your punctuation

Roger
-Original Message-
From: Karl James [mailto:[EMAIL PROTECTED]
Sent: Friday, March 21, 2003 6:51 PM
To: [EMAIL PROTECTED]
Subject: sql,query


sql,query
You have written the following:
My code:
http://nopaste.php-q.net/8594
My site:
http://66.12.3.67/webdb/webdb13/assignment_1a.php
My goal:
http://66.12.3.67/webdb/webdb19/assign01/index.php
==
Can anyone help me get this resolved please?
Thanks Karl



ultimatefootballleague.com/index.php
[EMAIL PROTECTED]








ultimatefootballleague.com/index.php
[EMAIL PROTECTED]




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



RE: Mysql, Need extra Cash? - Get Paid in 48hrs - Home Reps Needed .Com home representatives are required!

2003-03-18 Thread Roger Davis
Maybe the "[EMAIL PROTECTED]" address should be changed to
"[EMAIL PROTECTED]" so people can't pull the Username off the e-mail
address and bypass the filter.

-Original Message-
From: John Klein [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 18, 2003 1:18 PM
To: [EMAIL PROTECTED]
Subject: Re: Mysql, Need extra Cash? - Get Paid in 48hrs - Home Reps
Needed .Com home representatives are required!


On Tue, 18 Feb 2003, Virdhagriswaran SHIBATA wrote:

> Mysql, your immediate help is needed.  We are a .com
> corporation that is growing fast (over 1000% per year). We simply cannot
> keep up with demand.

Remind me again why we bother with a spam filter?

--
John Klein
Database Applications Developer
Network Applications Services - Harvard Law School
Omnia Mutantur, Nihil Interit

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



RE: Finding an ID between two dates

2003-03-14 Thread Roger Davis
Add quotes to you date.

SELECT time_period_id FROM time_periods
WHERE '2003-03-14' BETWEEN time_period_start AND time_period_end;

Worked for me.

Roger

-Original Message-
From: Cory Hicks [mailto:[EMAIL PROTECTED]
Sent: Friday, March 14, 2003 3:05 PM
To: [EMAIL PROTECTED]
Subject: Finding an ID between two dates


Hey folks!

I am stumpedbeen reading the online manual, google groups, to no
avail.

I have a very simple table:

time_period_id int(11) NOT NULL auto_increment,
time_period_start date NOT NULL default '-00-00',
time_period_end date NOT NULL default '-00-00',
PRIMARY KEY  (time_period_id)

I am trying to get the ID that relates to a date falling between the
range of time_period_start(2003-03-01) and time_period_end(2003-03-15):

$sql = SELECT time_period_id FROM time_periods
WHERE 2003-03-14 BETWEEN time_period_start AND time_period_end;

I should get one result form the query, the id, but I get no results.

Advice? Helpful hints always welcome..

Many thanks!

Cory
--
Cory Hicks
Texas Research International, Inc.
[EMAIL PROTECTED]


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



RE: problem

2003-03-10 Thread Roger Davis
Well, believe it or not  SUCCESS!!  That's right, you were running the mysql
Server.
Now for something you should try.  Find the winmysqladmin.exe (Should be in
the same folder.  Run that one.  It will allow you to run the mysqld as a
service, give you stat's on whats going on, and start and stop the server.
You are on the right track, just keep on plugging!!!

Roger

-Original Message-
From: Philip McCarthy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 11, 2003 12:16 AM
To: [EMAIL PROTECTED]
Subject: problem


Hi Loren



I started over; uninstalled mysql and reinstalled.



The file I used was mysql-3.23.55-win



This unzipped ok and installed into a folder called mysql on my c drive.



Following http://www.mysql.com/doc/en/Windows_server_first_start.html
the first thing I tried was:



C:\mysql\bin> mysqld-max --standalone



I did this by bringing up the cmd window and the following keystrokes;



cd \ (enter)



cd mysql (enter)



cd bin (enter)



mysqld-max --standalone (enter)



I even tried putting a space in front of mysqld-max... as there is in
'mysqld-max --standalone'



On both occasions the title bar of the dos window changed from 'Command
Prompt' to 'Command Prompt - mysqld-max --standalone' and the cursor
jumped to the next line without text on it and stayed there flashing and
basically locked out - it would not respond to any keystrokes
whatsoever.



With regards to my book, it seems odd but it does appear it has unix
commands mixed in with the Windows stuff - an error I presume but a
pretty severe one to make.  Anyway, that in mind I won't follow that in
setting up mysql rather I will use the bonafide mysql manual.  Then I
should be right to learn the commands from the book.



I note your comments about my.ini and my.cfg and I guess I will look at
that once I have sorted out the above problem.



I also note that if I navigate through windows explorer and located the
mysql exe file in the bin folder in the mysql folder and double click
it, it seems to start up mysql ok.  When I look at the current processes
with task manager, there are five instances of mysqld-max.exe.  Does
this mean everthing is running ok? Also if I type mysql whilst in the
bin folder, the mysql monitor comes up ok.



Look forward to your reply



Philip McCarthy













-Original Message-

From: Loren McDonald [mailto:[EMAIL PROTECTED]

Sent: 10/03/2003 6:07 AM

To: 'Philip McCarthy'; [EMAIL PROTECTED]

Subject: RE: inquiry[Scanned]



Philip,



For starters, you are not wasting my time.  I know the difficulties, as
it took me a while to get it installed and running.



I would suggest you take a look over your book a little more carefully.
I could be wrong, but it should have mentioned that mysql_install_db is
a shell script for Linux, not usable on Windows.



I don't have the book you are using so I can only refer you to the
windows installation section of the MySQL manual to get the ball
rolling.  After that (after you have it all set up), you "should" be
able to follow your book.



http://www.mysql.com/doc/en/Windows_installation.html

...also see the subsections and the windows specific links.



Also, from what you said, I gather you have not set up one of the my.ini
or my.cfg files.  This is most likely where you are having your
troubles. For more info about them, start here.



http://www.mysql.com/doc/en/Option_files.html



If after all that you still have troubles, drop me an email (use addy in
my sig below).  State what you did and any error messages you received
and I'll be glad to help get you on the right road again.



--

Loren McDonald

[EMAIL PROTECTED]



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



RE: Searching on indexed char field...

2003-03-10 Thread Roger Davis
This may not be the solution you are looking for, but if you are executing
ths query 1000 times, it must be in a program somewhere, so why not execute
it once, pullout the UserID the run the rest on UserID?

Hope this helps.
Roger

-Original Message-
From: Jason West [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 1:40 PM
To: [EMAIL PROTECTED]
Subject: Searching on indexed char field...


Does anyone know of a way to speed up seek time when selecting based on
an indexed char field? I have a query that I'm executing ('select * from
Table where UserName = myname') and it takes approximately 7 seconds to
execute this 1000 times (UserName is char[50], and it is indexed). If I
change the query to search on UserID, an indexed integer field, the same
test runs in less than 1 second...

Any help is appreciated...
--
Jason H. West
Software Engineer

Softek Software International, Inc.
813 Pavilion Ct.
McDonough, GA 30253
678-583-5718
[EMAIL PROTECTED]


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



RE: Part Mysql part PHP question....

2003-03-08 Thread Roger Davis
I think this is more of a Programming problem, but to get you started.
In your database add a field call it updated make it char(1) like
ALTER TABLE Hockey ADD Updated char(1) default NULL;

On the first page when you start processing the players put in a programming
line to update all the players like..

UPDATE Hockey SET Updated = 'N';

Then in your update page do

SELECT * FROM Hockey WHERE Updated = 'N';

If there are any records in the set continue processing else go to finished
page.

When you update that particular players stats don't forget to SET Updated =
'Y';

Hope this helps.
Roger

-Original Message-
From: C. Reeve [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 08, 2003 6:44 PM
To: MySQL List
Subject: Part Mysql part PHP question


Hi,

I have a hockey database with players names in it and I want to be able to
update their stats one after the other. To be more clear - when the page is
first entered I want the first players name to automatically appear showing
his current stats (this will be in a form). Then you can update the record
and write it back to the database, then the next player will show up with
his stats showing, and the process continues until all the players have been
done. Setting up the database and forms is no problem, but I'm not sure how
I would keep count of what player has been done so the next one
automatically appears (and if there should be a power failure orWindows
crashes, or whatever else - I want the process to start at the last player
being updated - I don't want to have to start again from player one).  I'm
not sure if this is more a PHP or MySQL question - or both - so I have sent
it to both lists.

Thanks

C. Reeve



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



RE: ERROR 1045: Access denied for user:

2003-03-06 Thread Roger Davis
Or

mysql>> flush privileges;

Roger

-Original Message-
From: Ben Balbo [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 06, 2003 7:08 PM
To: MySQL List
Subject: Re: ERROR 1045: Access denied for user:


Hi Steve,

Really silly question, but you are reloading the tables once you
change the grants, aren't you :-)

mysqladmin -p reload

B.

In response to your mail sent on Friday, March 07, 2003 at 10:48:06 AM.

> Mysql version 3.23.55 Slackware linux 8.0
> Mysql version 3.23.55 OpenBSD

> I have tried 3 versions of mysql on linux and
> on OpenBSD. I have even tried compiling on linux
> from the source tarball.

> Without the GRANT privs to allow network access:
mysql>> GRANT ALL PRIVILEGES ON db.*
> -> TO user@'192.58.197.0/255.255.255.0';
> (example), I would get a "you are not allowed to connect"
> error. Once I applied the grant to the user:
mysql>> GRANT ALL PRIVILEGES ON db.*
> -> TO user@'%'
> the users table shows:
> | Host| User  |
> ---
> | %   | user  |

> If I coonect to the database without a host, or
> with host set to localhost, I can connect fine. If
> I connect from another machine, or just use the DNS
> name on the local machine, I get:
>  mysql -h 192.168.1.24 -u test -p

> ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using
> password: YES)

> I have even tried connecting using the IP address. I have poured
> over the docs, and have tried all the scenarios of add hostnames
> to /etc/hosts etc. I even complied from source (glibc problem).
> No luck at all... Any ideas? I really need network access to the
> database.
> --
> Steve (egrep)


> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)

> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



RE: help with join syntax

2003-03-04 Thread Roger Davis
try thi

FROM lawfac_pub INNER JOIN fac_stud_lunch ON lawfac_pub.hawkid =
fac_stud_lunch_join.instructor_hawkid INNER JOIN fac_stud_lunch_join ON
fac_stud_lunch.instructor_hawkid = fac_stud_lunch_join.instructor_hawkid

-Original Message-
From: Martin Ostlund [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 04, 2003 4:58 PM
To: Bob Ramsey
Cc: [EMAIL PROTECTED]
Subject: Re: help with join syntax


Hi.

This is not at all an answer to your problem,
and perhaps you're already aware of my tip:

I usually use phpMyAdmin and paste my SQL statements
in there to see what is causing the error, and when it works
you get a pretty good picture of how your "virtual" table
looks like.

Just my 2 cents.

Cheers, Martin

On Tue, 4 Mar 2003, Bob Ramsey wrote:

> Hi,
>
> I have the following tables:
>
> mysql> describe lawfac_pub;
> ++--+--+-+-+---+
> | Field  | Type | Null | Key | Default | Extra |
> ++--+--+-+-+---+
> | hawkid | varchar(16)  |  | PRI | |   |
> | emailalias | varchar(128) | YES  | | NULL|   |
> | first_name | varchar(64)  | YES  | | NULL|   |
> | last_name  | varchar(64)  | YES  | | NULL|   |
> | title  | varchar(128) | YES  | | NULL|   |
> | building   | varchar(128) | YES  | | BLB |   |
> | phone  | varchar(64)  | YES  | | NULL|   |
> | room   | varchar(255) | YES  | | NULL|   |
> | notes  | varchar(255) | YES  | | NULL|   |
> ++--+--+-+-+---+
>
> mysql> describe fac_stud_lunch;
>
+---++--+-+-
+---+
> | Field | Type   | Null | Key |
> Default | Extra |
>
+---++--+-+-
+---+
> | instructor_hawkid | varchar(16)|  | PRI
> | |   |
> | meal_time | datetime   |  | PRI | -00-00
> 00:00:00 |   |
> | meal_type | enum('lunch','supper') |  | |
> lunch   |   |
> | location  |
> varchar(128)   |  | | |   |
> | num_students  | int(11)| YES  | |
> NULL|   |
>
+---++--+-+-
+---+
>
> mysql> describe fac_stud_lunch_join;
>
+---+-+--+-+-+--
-+
> | Field | Type| Null | Key | Default |
Extra |
>
+---+-+--+-+-+--
-+
> | instructor_hawkid | varchar(16) |  | PRI | |
|
> | student_hawkid| varchar(16) |  | PRI | |
|
> | meal_time | datetime|  | PRI | -00-00 00:00:00 |
|
>
+---+-+--+-+-+--
-+
>
>
>
> And this is my query I run from php:
>
> SELECT DISTINCT lawfac_pub.first_name, lawfac_pub.last_name,
> date_format(fac_stud_lunch.meal_time, "%W, %M %D, %Y") as formatted_date,
> fac_stud_lunch.meal_time AS fac_stud_lunch_meal_time,
> fac_stud_lunch.instructor_hawkid, fac_stud_lunch.meal_type,
> fac_stud_lunch.location, fac_stud_lunch.num_students
> FROM lawfac_pub INNER JOIN (fac_stud_lunch INNER JOIN fac_stud_lunch_join
> ON fac_stud_lunch.instructor_hawkid =
> fac_stud_lunch_join.instructor_hawkid) ON lawfac_pub.hawkid =
> fac_stud_lunch_join.instructor_hawkid
> WHERE (((fac_stud_lunch_join.student_hawkid) Not Like 's1')) order by
> fac_stud_lunch.meal_time;
>
> And I keep getting an error on the inner join.  I've usually been able to
> get the syntax for joining 3 or 4 tables by using Access, but it seems to
> have failed me this time.
>
> Any ideas why this select statement is failing?
>
> Thanks,
>
> Bob
>
>
>
>
> ==
> Bob Ramsey   Applications Development & Support II
> ph:  1(319)335-9956  216 Boyd Law Building
> fax: 1(319)335-9019  University of Iowa College of Law
> mailto:[EMAIL PROTECTED]Iowa City, IA 52242-1113
> For Hardware and Software questions, call 5-9124
> ==
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>



RE: Very basic If statement still not working VERIFIED VARIABLES

2003-02-28 Thread Roger Davis
In your If statement (if this is still true) you are using...

> if(($applique == 1) && ($puffyfoam == 0))  etc.

But in your list you are using

> {$row['applique']} Applique
> {$row['puffyfoam']} Puffy Foam

Since I am seeing bits and pieces of code I am not sure that this is right
but try this.

Before your if statement use this code..

$applique=$row['applique'];
$puffyfoam=$row['puffyfoam'];
echo $applique;
echo $puffyfoam;

This will tell you if the PHP variables are getting set, and will "probably"
make your if statement work.

Roger

-Original Message-
From: Stitchin' [mailto:[EMAIL PROTECTED]
Sent: Friday, February 28, 2003 2:04 PM
To: [EMAIL PROTECTED]
Subject: Very basic If statement still not working VERIFIED VARIABLES


Here's what I've got in my form:

echo "{$row['designname']}
 {$row['designfile']}
 {$row['designcomments']}
 {$row['applique']} Applique
 {$row['puffyfoam']} Puffy Foam
 $message1\n";

The three designs are coming up:
1   0   1   Applique
1   1   0       Puffy Foam
oopsoopsoopsmessage1

This just doesn't make any sense!


-Original Message-
From: Roger Davis [mailto:[EMAIL PROTECTED]
Sent: Friday, February 28, 2003 12:50 PM
To: [EMAIL PROTECTED]
Subject: RE: Very basic If statement still not working 


Why don't you verify what the values are in the variables.  If the Variables
are not getting set then you would always see the "oops" in your statement.
Try...

echo $applique;
echo $puffyfoam;

Hope this helps
Roger
-Original Message-
From: Stitchin' [mailto:[EMAIL PROTECTED]
Sent: Friday, February 28, 2003 12:01 PM
To: [EMAIL PROTECTED]
Subject: Very basic If statement still not working 


Boy, this is getting real frustrating ... doesn't this seem to be child's
play?  I'm not trying to do anything fancy ... I tried the && and
parentheses suggested  below and it still didn't work.  I even tried to put
quotes around the zeros and ones thinking maybe the program wasn't
recognizing that they were numbers and it still didn't work 

-Original Message-
 The PHP logical AND operator is &&.

 Try
 if(($applique == 1) && ($puffyfoam == 0))  etc.

 HTH,
 Tore.

- Original Message -
>
> This is so simple and basic, I must be missing something
>
> I have php code for displaying my embroidery designs on the web page. It's
> going through the mySql database and the query to pull up all the designs
> for a chosen category works fine.  I have two fields in my database
> called "applique" and "puffyfoam" both are set up as tinyint(1)
> because all I'm storing there is a zero for no and a 1 for yes.
>
> But for the screen output I don't want these codes to show, I'd like a
com-
> ment to show up.  So I set up this "if" statement to place the proper
state-
> ment in a variable to be used in my echo statement (if both answers are
no,
> I don't want to print oops, I just put that there to see where stuff was
> happening)...
>
>
> if($applique == 1 and $puffyfoam == 0)
>{
>   $message1 = "Digitized for APPLIQUE";
>}
>elseif($applique == 0 and $puffyfoam == 1)
>{
>   $message1 = "Digitized for PUFFY FOAM";
>}
>elseif($applique == 1 and $puffyfoam == 1)
>{
>   $message1 = "Digitized for APPLIQUE and PUFFY FOAM";
>}
>else
>{
>   $message1 = "oops";
>}
>
> I have three records in this category that I've set up with answers to the
> two fields as 1,1 0,1 and 1,0 to see what message would show  none
> should show up as "oops" since none are 0,0.  I've also put the "applique"
> raw field data in my echo to see if it is pulling up the right answer as
> well ...
>
> The field is showing the correct field info for applique, they're showing
up
> as 1,0,1 BUT every one of the designs are showing the message "oops".
What
> am I doing wrong???
>
> TIA
> Renee :)



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL 

RE: Very basic If statement still not working ????

2003-02-28 Thread Roger Davis
Why don't you verify what the values are in the variables.  If the Variables
are not getting set then you would always see the "oops" in your statement.
Try...

echo $applique;
echo $puffyfoam;

Hope this helps
Roger
-Original Message-
From: Stitchin' [mailto:[EMAIL PROTECTED]
Sent: Friday, February 28, 2003 12:01 PM
To: [EMAIL PROTECTED]
Subject: Very basic If statement still not working 


Boy, this is getting real frustrating ... doesn't this seem to be child's
play?  I'm not trying to do anything fancy ... I tried the && and
parentheses suggested  below and it still didn't work.  I even tried to put
quotes around the zeros and ones thinking maybe the program wasn't
recognizing that they were numbers and it still didn't work 

-Original Message-
 The PHP logical AND operator is &&.

 Try
 if(($applique == 1) && ($puffyfoam == 0))  etc.

 HTH,
 Tore.

- Original Message -
>
> This is so simple and basic, I must be missing something
>
> I have php code for displaying my embroidery designs on the web page. It's
> going through the mySql database and the query to pull up all the designs
> for a chosen category works fine.  I have two fields in my database
> called "applique" and "puffyfoam" both are set up as tinyint(1)
> because all I'm storing there is a zero for no and a 1 for yes.
>
> But for the screen output I don't want these codes to show, I'd like a
com-
> ment to show up.  So I set up this "if" statement to place the proper
state-
> ment in a variable to be used in my echo statement (if both answers are
no,
> I don't want to print oops, I just put that there to see where stuff was
> happening)...
>
>
> if($applique == 1 and $puffyfoam == 0)
>{
>   $message1 = "Digitized for APPLIQUE";
>}
>elseif($applique == 0 and $puffyfoam == 1)
>{
>   $message1 = "Digitized for PUFFY FOAM";
>}
>elseif($applique == 1 and $puffyfoam == 1)
>{
>   $message1 = "Digitized for APPLIQUE and PUFFY FOAM";
>}
>else
>{
>   $message1 = "oops";
>}
>
> I have three records in this category that I've set up with answers to the
> two fields as 1,1 0,1 and 1,0 to see what message would show  none
> should show up as "oops" since none are 0,0.  I've also put the "applique"
> raw field data in my echo to see if it is pulling up the right answer as
> well ...
>
> The field is showing the correct field info for applique, they're showing
up
> as 1,0,1 BUT every one of the designs are showing the message "oops".
What
> am I doing wrong???
>
> TIA
> Renee :)



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



RE: Question for the GRANT statement

2003-02-24 Thread Roger Davis
The % wildcard works for granting permission over the network.  When you are
working on the localhost, you are using mysql.sock to connect to the server.
Try this (I believe it should work)  /bin/mysql -u iz3
ip'iz' -h'youripaddress'  This should allow you to connect using the network
and not mysql.sock

If you do not want to connect this way then you must add a line for
localhost to each user.

Hope this helps.
Roger

-Original Message-
From: ianhzhang [mailto:[EMAIL PROTECTED]
Sent: Monday, February 24, 2003 2:15 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Question for the GRANT statement


Thank you Lucas.
But why I have to put localhost at the end?  The manual says that I can
put a wild card "%",  like iz3@"%".  Or if I did not put anything, it
will automatically assume localhost.

Thanks again.

Ian Zhang

[EMAIL PROTECTED] wrote:

>Try this:
>
>GRANT ALL PRIVILEGES ON izdb.* TO iz2@'localhost' IDENTIFIED BY 'iz';
>
>
>
>Lucas Cowgar
>Information Technologies Department
>Eldorado Services Group Inc.
>http://www.eldoserv.com
>[EMAIL PROTECTED]
>(330) 861-3009
>
>"All your base are belong to us"
>
>- Original Message -
>From: "ianhzhang" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Monday, February 24, 2003 1:37 PM
>Subject: Question for the GRANT statement
>
>
>
>
>>Hi,
>>
>>I am new to MySQL and SQL in genreal.  I just installed mysql 3.23.55 on
>>my Red Hat Linux 7.1.
>>
>>I tried to GRANT user in the following way:
>>CREATE DATABASE izdb;
>>GRANT ALL ON izdb.* TO iz1 IDENTIFIED BY 'iz';
>>GRANT ALL ON izdb.* TO [EMAIL PROTECTED] IDENTIFIED BY 'iz';
>>GRANT ALL ON izdb.* TO iz3@"%" IDENTIFIED BY 'iz';
>>FLUSH PRIVILEGES;
>>
>>
>>It seems to me that I can only login using iz2.
>>
>>The output as follows:
>>[EMAIL PROTECTED] mysql]$ bin/mysql -u iz1 -p'iz'
>>ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)
>>--
>>[EMAIL PROTECTED] mysql]$ bin/mysql -u iz2 -p'iz'
>>Welcome to the MySQL monitor.  Commands end with ; or \g.
>>Your MySQL connection id is 12 to server version: 3.23.55-max
>>
>>Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>>
>>mysql> quit
>>Bye
>>
>>[EMAIL PROTECTED] mysql]$ bin/mysql -u iz3 -p'iz'
>>ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)
>>
>>--
>>Can anyone tell me what I did wrong with iz1 and iz3?  I thought iz1 and
>>iz2 should be the same and iz3 should be on any hosts.
>>
>>
>>By the way,  I print out all my SHOW GRANTS command output:
>>
>>Thank you.
>>
>>Ian Zhang
>>
>>
>>
>>
>>
>>mysql> SHOW GRANTS FOR iz1;
>>
>>
>>
>+--
-
>+
>
>
>>| Grants for [EMAIL PROTECTED] |
>>
>>
>>
>+--
-
>+
>
>
>>| GRANT USAGE ON *.* TO 'iz1'@'%' IDENTIFIED BY PASSWORD
>>'077deb434925b35d' |
>>| GRANT ALL PRIVILEGES ON `izdb`.* TO 'iz1'@'%' |
>>
>>
>>
>+--
-
>+
>
>
>>2 rows in set (0.00 sec)
>>
>>mysql> SHOW GRANTS FOR iz2;
>>ERROR 1141: There is no such grant defined for umysql> SHOW GRANTS FOR
>>
>>
>iz3;
>
>
>+--
-
>+
>
>
>>| Grants for [EMAIL PROTECTED] |
>>
>>
>>
>+--
-
>+
>
>
>>| GRANT USAGE ON *.* TO 'iz3'@'%' IDENTIFIED BY PASSWORD
>>'077deb434925b35d' |
>>| GRANT ALL PRIVILEGES ON `izdb`.* TO 'iz3'@'%' |
>>
>>
>>
>+--
-
>+
>
>
>>2 rows in set (0.00 sec)
>>
>>mysql> SHOW GRANTS FOR [EMAIL PROTECTED];
>>ERROR 1141: There is no such grant defined for user 'iz3' on host
>>'localhost'
>>ser 'iz2' on host '%'
>>mysql> SHOW GRANTS FOR [EMAIL PROTECTED];
>>
>>
>>
>+--
-
>+
>
>
>>| Grants for [EMAIL PROTECTED] |
>>
>>
>>
>+--
-
>+
>
>
>>| GRANT USAGE ON *.* TO 'iz2'@'localhost' IDENTIFIED BY PASSWORD
>>'077deb434925b35d' |
>>| GRANT ALL PRIVILEGES ON `izdb`.* TO 'iz2'@'localhost' |
>>
>>
>>
>+--
-
>+
>
>
>>2 rows in set (0.00 sec)
>>
>>
>>
>>
>>-
>>Before posting, please check:
>>   http://www.mysql.com/manual.php   (the manual)
>>   http://lists.mysql.com/   (the list archive)
>>
>>To request this thread, e-mail <[EMAIL PROTECTED]>
>>To unsubscribe, e-mail
>>
>>
><[EMAIL PROTECTED]>
>
>
>>Trouble unsubscribing? Try: ht

RE: Writing program to communicate with remote internet MySQL server?

2003-01-24 Thread Roger Davis
Absolutely it is possible (With cavaets).
The cavaets are...
1.  Does you web hosting company allow external access to your MySQL
database. I do not know for sure but it looks like they might (telnet works
to port 3306).
2.  Is your Mysql user set up to allow external access.
3.  If you are going to try to synchronize the tables yourself.  Not an easy
task.  My 3 suggestions to you for this are:
a.  Whenever your application changes the database, log the changes to a
separate table. (Not really reliable since you can change the tables in the
MySQL client program that would never get logged).
b.  Write a program that checks every record in the 2 seperate database,
making changes when you  find them. (not very fast).
c.  Turn on the bin-log on your local server, then issue the same commands
to the remote server.  (Most definately the way to go.)

As for your question on how to do it on the remote server. Since you are
already familiar with VB/MyODBC the that is definately the way to go.  Just
create a separate DSN for the remote server and use whatever tool you are
familiar with to do the updates.

Hope this helps.
Roger

-Original Message-
From: M Wells [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 9:32 AM
To: [EMAIL PROTECTED]
Subject: Writing program to communicate with remote internet MySQL
server?


Hello All,

For some time I've been wondering if it's possible to write a program
that can automatically check my local MySQL server, create a recordset
containing any new or updated records found in my local table(s) since
the last check, and upload those new / updated records to the MySQL
server my web site uses at phpwebhosting.com.

My background is VB / VBA, but I also have access to Perl, Python and
Ruby.

I'm wondering if anyone can tell me if it's possible, using one of these
languages, to connect to a remote MySQL server over the internet and to
manipulate tables on the remote server as though they were recordset
objects, similarly to how you might achieve this on a local server using
MyODBC?

The end goal is to develop a program I can fire as a Windows XP
scheduled task to synchronize the remote database with the local one.

Any help appreciated!

Regards and best wishes,

M Wells



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: running mysql (mysql users)

2002-12-15 Thread Roger Davis
>>Most things I've read say to establish a "mysql" user -I take it this
>>is to run the daemon(mysqld?) under?
Correct

>>Is the above user one that will be created in the users table of the
>>mysql db? What mysql privileges does such a user need?
No, this is a unix/linux user that is used to run the daemon like you
mentioned above.

>>Also, why is a mysql "root" user needed and what mysql privileges does
>>that user need?
This is the "Super User" for mysql.  It is set up as root so you can login
to mysql after the initial install and immediately get to work.  The root
user is only set up for localhost privileges though, so you could not
connect from another computer through TCPIP and login to mysql.

One thing you need to remember is that Users in mysql, really have no
connection to unix/linux users except that if you don't use any username
directive (mysql -u uname) it will use the unix/linux username to log you in
with.

>>I usually make "myself" a mysql superuser, should I do that?
usually a good idea, that way you can add mysql users to the list of people
that can use the databases.

Hope this helps.
Roger

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 14, 2002 8:12 PM
To: MySQL List
Subject: running mysql (mysql users)


I wish to attempt to clarify one of my earlier questions:

Most things I've read say to establish a "mysql" user -I take it this
is to run the daemon(mysqld?) under?
Is the above user one that will be created in the users table of the
mysql db? What mysql privileges does such a user need?

Also, why is a mysql "root" user needed and what mysql privileges does
that user need?

I do not know how this fits in with the above users (root & mysql) but
I usually make "myself" a mysql superuser, should I do that?

Thanks,

TR


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: INSERT confirmation? PHP

2002-12-15 Thread Roger Davis
If you are unsure about using the mysql_insert_id, have PHP use a session
variable then do the following,

1.  On the insert command, use the session variable as the Name of the class.
2.  Retrieve the record with the session variable as the name.
3.  Update the record you just retrieve with the name of the class.
4.  Pass the ID of the record you just retrieve to the other Insert for the
Workshop table.

Hope this helps
Roger

-Original Message-
From: Michael T. Babcock [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 14, 2002 8:08 PM
To: Peter Lovatt
Cc: Steve Lefevre; [EMAIL PROTECTED]
Subject: Re: INSERT confirmation? PHP


Peter Lovatt wrote:

>mysql_insert_id
>should do it!
>
>

According to documentation somewhere, last insert can sometimes return a
different value than the most recent insert if the most recent insert
failed.

What is a better solution?

--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: MySQL Command to "List" existing db's = ??

2002-12-09 Thread Roger Davis
If I understand right try..

SHOW DATABASES;

The mysql and test database are installed by default.

Hope this helps

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 09, 2002 8:12 PM
To: [EMAIL PROTECTED]
Subject: MySQL Command to "List" existing db's = ??


I have a Linux/Apache/MySQL box with a number of MySQL db's on it... all
were created by someone else expermenting with MySQL...

I'm not sure of all the names of the db's on the system...

Is there a MySQL command to "List" the names of all the MySQL db's on the
box?

The system is not on the net... it is local and to be used for off line
development work.

thanks for any info - Will


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Order By or Group By Help Please

2002-12-05 Thread Roger Davis
Ok, I will try this one again.

I need some help on a select if it is possible.  Take for Example the
following data.

--
| RUSH | FileNumber | PTime  | PDate |
--
|  1   | 1-1023-001 | 08:00  | 12/04 |
|  1   | 1--001 | 06:00  | 12/04 |
|  0   | 1-1023-002 | 14:00  | 12/09 |
|  1   | 1--000 | 08:30  | 12/04 |
|  0   | 1-1023-003 | 11:00  | 12/10 |
|  1   | 1--123 | 08:00  | 12/04 |
|  0   | 1--124 | 09:30  | 12/09 |
|  0   | 1-6655-021 | 08:40  | 12/11 |
|  0   | 1--125 | 10:00  | 12/15 |
|  1   | 1-7654-043 | 08:00  | 12/05 |
|  0   | 1-6655-022 | 13:30  | 12/15 |
|  0   | 1-9868-000 | 14:00  | 12/05 |
--

To end up grouped like this.

--
| RUSH | FileNumber | PTime  | PDate |
--
|  1   | 1--001 | 06:00  | 12/04 |
|  1   | 1-1023-001 | 08:00  | 12/04 |
|  0   | 1-1023-002 | 14:00  | 12/09 |
|  0   | 1-1023-003 | 11:00  | 12/10 |
|  1   | 1--123 | 08:00  | 12/04 |
|  0   | 1--124 | 09:30  | 12/09 |
|  0   | 1--125 | 10:00  | 12/15 |
|  1   | 1--000 | 08:30  | 12/04 |
|  1   | 1-7654-043 | 08:00  | 12/05 |
|  0   | 1-9868-000 | 14:00  | 12/05 |
|  0   | 1-6655-021 | 08:40  | 12/11 |
|  0   | 1-6655-022 | 13:30  | 12/15 |
--

Basically, I need this.

If it is a RUSH (1), It needs to be first
If there are duplicate files (Like 1- (it has 2 dups) or 1-1023 (2
dups)) and one of them is a rush
They need to be grouped together.

Then sort it by PDate and PTime

I have tried several group by combinations but no luck so far.  Any help
will be appreciated.

Thanks
Roger

Oh yeah,   SQL, MySQL

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Help With SELECT

2002-12-04 Thread Roger Davis
I need some help on a select if it is possible.  Take for Example the
following data.

--
| RUSH | FileNumber | PTime  | PDate |
--
|  1   | 1-1023-001 | 08:00  | 12/04 |
|  1   | 1--001 | 06:00  | 12/04 |
|  0   | 1-1023-002 | 14:00  | 12/09 |
|  1   | 1--000 | 08:30  | 12/04 |
|  0   | 1-1023-003 | 11:00  | 12/10 |
|  1   | 1--123 | 08:00  | 12/04 |
|  0   | 1--124 | 09:30  | 12/09 |
|  0   | 1-6655-021 | 08:40  | 12/11 |
|  0   | 1--125 | 10:00  | 12/15 |
|  1   | 1-7654-043 | 08:00  | 12/05 |
|  0   | 1-6655-022 | 13:30  | 12/15 |
|  0   | 1-9868-000 | 14:00  | 12/05 |
--

To end up grouped like this.

--
| RUSH | FileNumber | PTime  | PDate |
--
|  1   | 1--001 | 06:00  | 12/04 |
|  1   | 1-1023-001 | 08:00  | 12/04 |
|  0   | 1-1023-002 | 14:00  | 12/09 |
|  0   | 1-1023-003 | 11:00  | 12/10 |
|  1   | 1--123 | 08:00  | 12/04 |
|  0   | 1--124 | 09:30  | 12/09 |
|  0   | 1--125 | 10:00  | 12/15 |
|  1   | 1--000 | 08:30  | 12/04 |
|  1   | 1-7654-043 | 08:00  | 12/05 |
|  0   | 1-9868-000 | 14:00  | 12/05 |
|  0   | 1-6655-021 | 08:40  | 12/11 |
|  0   | 1-6655-022 | 13:30  | 12/15 |
--

Basically, I need this.

If it is a RUSH (1), It needs to be first
If there are duplicate files (1- or 1-1023) and one of them is a rush
They need to be grouped together.

Then sort it by PDate and PTime

I have tried several group by combinations but no luck so far.  Any help
will be appreciated.

Thanks
Roger

SQL, MySQL


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: redhat 8.0

2002-11-15 Thread Roger Davis
Redhat 8.0 includes mysql.  Although it is not a part of the default
install, you can install it by choosing the option to select which packages
will be installed.  Or if you already have redhat 8.0 installed, the mysql
rpms are on the CD's (number 3 I think).

Also, make sure that you update your system after the install.

Hope this helps.
Roger

-Original Message-
From: paul taylor [mailto:ptay1@;earthlink.net]
Sent: Friday, November 15, 2002 5:57 PM
To: [EMAIL PROTECTED]
Subject: redhat 8.0


will redhat 8.0 support mysql (kernal 2.4.18-14)??
thank you



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Making MySQL insecure on purpose...

2002-10-22 Thread Roger Davis
Sounds like all is set up properly, but, have you give your mysql USERS
permissions to connect from from the 192.168.1 network?

The Really Insecure way of doing this is...

GRANT ALL PRIVILEGES ON *.* TO mysqlusernamehere@"%" IDENTIFIED BY
'mypasswordhere';

FLUSH PRIVILEGES;

Hope this helps

Roger

SQL, MySQL


-Original Message-
From: Jim Hogan [mailto:jimhogan@;drizzle.com]
Sent: Tuesday, October 22, 2002 11:32 PM
To: [EMAIL PROTECTED]
Subject: Making MySQL insecure on purpose...


I have set up MySQl before and have done it "the right way" (I think!)

My situation today?  I am setting up MySQL on a Linux machine with a 1394-
attached 80GB drive for a 3-week project after which my setup will be
thrown away.  Due to some software dependencies, this DB will need to be
accessed by a Win2K box running MyODBC.  An isolated, 2-node network.

Well, I am 90 percent of the way there, DB us running and accessible on
localhost with phpMyAdmin, but (after 2-3 hours of wresting) MyODBC client
still returns 1130 errors..."Unable to connect from host 192.168.1.100".

Yes, I have looked through the docs and have made all changes to
mysql:host/user that I could think of, have added "skip-name-resolve" to
my.cnf options.

Time is of the essence.  To short-circuit this particular problem and
perhaps get on with my real work, I ask:

Is there a set of CNF and mysql DB entries that I could implement that
would assure that I have the *least* secure MySQL config possible?!?!?

*Then* if I'm still getting 1130s and such, well, I'll just have to
troubleshoot some more!!

Thanks,

Jim


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Can't Restart Server

2002-10-22 Thread Roger Davis
Sorry,

yes I did run myisamchk *.MYI -r in all the Database folders and everything
repaired fine

After trying to restart the Mysql Server, there is a mysql.sock file in the
mysql folder (appears to be left over from the crash).

>From the /var/lib/mysql/mysql folder...


[root@SQLServer1 mysql]# ll
total 108
-rw-rw1 mysqlmysql8778 Oct 22 17:50 columns_priv.frm
-rw-rw1 mysqlmysql   0 Oct 22 17:50 columns_priv.MYD
-rw-rw1 mysqlmysql1024 Oct 22 17:50 columns_priv.MYI
-rw-rw1 mysqlmysql8982 Oct 22 17:50 db.frm
-rw-rw1 mysqlmysql 604 Oct 22 17:50 db.MYD
-rw-rw1 mysqlmysql3072 Oct 22 17:50 db.MYI
-rw-rw1 mysqlmysql8641 Oct 22 17:50 func.frm
-rw-rw1 mysqlmysql   0 Oct 22 17:50 func.MYD
-rw-rw1 mysqlmysql1024 Oct 22 17:50 func.MYI
-rw-rw1 mysqlmysql8958 Oct 22 17:50 host.frm
-rw-rw1 mysqlmysql   0 Oct 22 17:50 host.MYD
-rw-rw1 mysqlmysql1024 Oct 22 17:50 host.MYI
-rw-rw1 mysqlmysql8877 Oct 22 17:50 tables_priv.frm
-rw-rw1 mysqlmysql 285 Oct 22 17:50 tables_priv.MYD
-rw-rw1 mysqlmysql3072 Oct 22 17:50 tables_priv.MYI
-rw-rw1 mysqlmysql9148 Oct 22 17:50 user.frm
-rw-rw1 mysqlmysql1391 Oct 22 17:50 user.MYD
-rw-rw1 mysqlmysql2048 Oct 22 17:50 user.MYI

All the Databases are there, infact, that was the quickest way for me to get
the backup server running, I copied all the files to the backup folder
(excluding the files from the mysql subfolder).


Thanks
Roger

SQL, MySQL

-Original Message-
From: Ed Carp [mailto:erc@;pobox.com]
Sent: Tuesday, October 22, 2002 7:27 PM
To: Roger Davis; [EMAIL PROTECTED]
Subject: RE: Can't Restart Server


> 021022 17:54:13  mysqld started
> 021022 17:54:13  bdb:  PANIC: No such file or directory
> 021022 17:54:13  Can't init databases
> 021022 17:54:13  mysqld ended

Have you tried all the obvious things before you posted?

> [mysqld]
> datadir=/var/lib/mysql

Is this directory exist - if so, what's in it?  If there are databases
there, have you run the repair utility?

sql, query


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Can't Restart Server

2002-10-22 Thread Roger Davis
Quick Synopsis.

Server went down due to power failure.  Upon reboot the mysql server was not
up and running.  When trying to restart I get the following message in the
mysqld.log.

021022 17:54:13  mysqld started
021022 17:54:13  bdb:  PANIC: No such file or directory
021022 17:54:13  Can't init databases
021022 17:54:13  mysqld ended

Running mysql version 3.23.49 on redhat 7.3

Oct 22 16:50:41 SQLServer1 kernel: Linux version 2.4.18-3smp
([EMAIL PROTECTED])
(gcc version 2.96 2731 (Red Hat Linux 7.3 2.96-110)) #1 SMP
Thu Apr 18 07:27:31 EDT 2002

the my.cnf file is in the /etc directory


[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
set-variable = max_connections=1000
log-bin
server-id=1
skip-innodb

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


If anyone can help I would greatly appreciate it.

Thanks

Roger Davis

SQL, MySQL


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: MS Access and mySQL

2002-08-28 Thread Roger Davis

Or you could just use the libmySQL.dll and handle everything yourself
through VB.


>>You will however need to download the MyODBC driver if you wish to access
>>MySQL through VB.
>>
>>-Nick



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: mysql comes with linux ?

2002-08-19 Thread Roger Davis

Redhat (at least 7.3) comes with MySQL.  If select the default install for
server, it will NOT install MySQL.  You must check the box to Select
individual packages, and check off the MySQL binaries.  Of course, you can
always install them After the installation from the CD's but you might have
to work out a few dependancies, especially if you are linking to a websever
with php or perl.

Roger

-Original Message-
From: Weaver, Walt [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 04:40 PM
To: [EMAIL PROTECTED]
Subject: RE: mysql comes with linux ?


I wasn't aware of this. I thought the Red Hat database was PostgreSQL.

--Walt Weaver
  Bozeman, Montana

-Original Message-
From: john greene [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 2:32 PM
To: [EMAIL PROTECTED]
Subject: mysql comes with linux ?


red hat linux implementations by default would have
the mysql database ? ie if i install the server
version of redhat linux then i get mysql database as
well. right ?
any tips whemn using/configuring/installing mysql
database with redhat linux.



Want to sell your car? advertise on Yahoo Autos Classifieds. It's Free!!
   visit http://in.autos.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Supplied argument is not a valid MySQL result resource!!

2002-08-16 Thread Roger Davis

I don't know if you cut and pasted your code, if you did then try this.

$qid = mysql_query("SELECT * FROM 1_nodedata WHERE id = ".$edit_id.";");
$tr = mysql_num_rows ($qid);
echo $tr;

That should give us a count of the rows and it will make sure our query is
returning something.



-Original Message-
From: Anil Garg [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 15, 2002 05:34 PM
To: SteveH; [EMAIL PROTECTED]
Subject: Re: Supplied argument is not a valid MySQL result resource!!


hi,
m sorry i dint mention that its just a part of code.
i am able to delete entries from the database .so i think mysql_connect is
not the reason.
please tell if u have some more ideas

regards
anil
- Original Message -
From: "SteveH" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 15, 2002 4:50 PM
Subject: Re: Supplied argument is not a valid MySQL result resource!!


> Anil,
>
> You never created a connection.
> mysql_connect()
>
>
> Regards.
>
>
>
>
>
> Thursday, August 15, 2002, 1:12:21 PM, you wrote:
>
> > Hi,
> > in the piece of code given below
> > ---
> > $qid = mysql_query("
> >  SELECT *
> >  FROM 1_nodedata
> >  WHERE id = $edit_id
> >  ");
> >  $frm = mysql_fetch_array($qid);
> > ---
> > i get the follownig error:
>
> > Warning: Supplied argument is not a valid MySQL result resource in
> > /z/mercury/www/niksun/admin/add_doc.php on line 107
> > element type:
>
> > What is it happening so!!
> > regards
> > anil
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php