RE: Secure logon from VB.net

2004-09-21 Thread Paul Maine
If MySQL is running on a unix/Linux server you can use the native ssh that
is available on that system and then you don't need anything special in so
far as ssh or SSL is concerned with MySQL. You don't have to use MySQL 4.x.

The basic idea from VB.net is to create an SSH tunnel to the MySQL host
server and forward port 3306.

>From the client VB.net application, you connect to localhost( it uses port
3306 by default) and use the username and password for MySQL( on the remote
host). The connection is sent securly through the tunnel and your problem is
solved.

Make secure you close the tunnel after you use it.


Paul


-Original Message-
From: Joe Audette [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 3:01 PM
To: [EMAIL PROTECTED]
Subject: Re: Secure logon from VB.net


Thomas,

http://dev.mysql.com/doc/mysql/search.php?q=ssl&lang=en&charset=iso-8859-1

It looks like SSL/SSH are only available as of MySQL 4 or higher.
Is your Net Admin really worried about eaves dropping of packets on the
local network. It must be very sensitive data. If you already have a MySQL
database on your network that is lower version than 4 then how do the other
apps connect to it securely? Or is your app the only one that needs this
level of security and other app can transmit to the db in clear text?

Joe Audette

Thomas Trutt <[EMAIL PROTECTED]> wrote:
Thanks,

Actually it is the transmission connection string he is worried
about. I might have to go with an SSL connection and go from there.. The
problems being that I'm not sure what software i have available to me on
the server and what software i can add to the client machines..

this might be another simple question but with SSL can i have 5-6 machines
all connected to the same server with the same user id being used??
Unfortunately I'm new to SSL..

Many thanks,

Tom T

At 03:31 PM 9/21/2004, you wrote:
>Thomas,
>
>Are you sure that encrypting the connection string is what your network
>admin means?
>
>When I hear someone say they want the logon encrypted I would think they
>mean store the password of a user encrypted in the db. That is, the
>application requires the user to logon and user info is stored in the db
>to logon against. When the user enters a username and password the
>password is encrypted and compared to an encrypted password in the db to
>validate the user.
>
>I think you can use ssl to encrypt all communication between your app and
>the database but I don't know of a way to pass an encrypted connection
>string and have the db decrypt it before it makes a connection. My
>ignorance doesn't mean its not possible so maybe someone else can suggest
>something.
>
>If the idea is to prevent someone from seeing your code and learning a db
>logon I guess you could store the connection string encrypted in a config
>file for your app then decrypt it before you connect. You'd have to use an
>encryption that can be decrypted with a key.
>Checkout the System.Security.Cryptography.DESCryptoServiceProvider class
>
>Hope that helps,
>
>Joe Audette
>
>Thomas Trutt wrote:
>Hello all,
>
>Ok i know this may be a simple question but i need a little help.
>I am writing a program in VB.net that uses MySQL as a backend. My net admin
>wants the log on to be encrypted??
>
>This is currently how i am connecting:
>
>Public LocalSYS As New OdbcConnection("DRIVER={MySQL ODBC 3.51
>Driver};" & _
>"SERVER=192.168.0.1;" & _
>"DATABASE=DB;" & _
>"UID=User;" & _
>"PASSWORD=Password;" & _
>"OPTION=3;")
>
>As you can see its a public variable that i have declared so that i don't
>have to continuously add it for every form in the program.. So the question
>i have is how do i change this so that it is encrypted??? Any ideas and
>suggestions would be greatly appreciated..
>
>Many thanks,
>
>Tom T
>
>[EMAIL PROTECTED]
>http://www.joeaudette.com
>http://www.mojoportal.com


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



[EMAIL PROTECTED]
http://www.joeaudette.com
http://www.mojoportal.com


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



RE: Secure logon from VB.net

2004-09-21 Thread Paul Maine
You can connect securly using ssh and perform port forwarding through the
tunnel.

Paul

-Original Message-
From: Joe Audette [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 2:32 PM
To: [EMAIL PROTECTED]
Subject: Re: Secure logon from VB.net


Thomas,

Are you sure that encrypting the connection string  is what your network
admin means?

When I hear someone say they want the logon encrypted I would think they
mean store the password of a user encrypted in the db. That is, the
application requires the user to logon and user info is stored in the db to
logon against. When the user enters a username and password the password is
encrypted and compared to an encrypted password in the db to validate the
user.

I think you can use ssl to encrypt all communication between your app and
the database but I don't know of a way to pass an encrypted connection
string and have the db decrypt it before it makes a connection. My ignorance
doesn't mean its not possible so maybe someone else can suggest something.

If the idea is to prevent someone from seeing your code and learning a db
logon I guess you could store the connection string encrypted in a config
file for your app then decrypt it before you connect. You'd have to use an
encryption that can be decrypted with a key.
Checkout the System.Security.Cryptography.DESCryptoServiceProvider class

Hope that helps,

Joe Audette

Thomas Trutt <[EMAIL PROTECTED]> wrote:
Hello all,

Ok i know this may be a simple question but i need a little help.
I am writing a program in VB.net that uses MySQL as a backend. My net admin
wants the log on to be encrypted??

This is currently how i am connecting:

Public LocalSYS As New OdbcConnection("DRIVER={MySQL ODBC 3.51
Driver};" & _
"SERVER=192.168.0.1;" & _
"DATABASE=DB;" & _
"UID=User;" & _
"PASSWORD=Password;" & _
"OPTION=3;")

As you can see its a public variable that i have declared so that i don't
have to continuously add it for every form in the program.. So the question
i have is how do i change this so that it is encrypted??? Any ideas and
suggestions would be greatly appreciated..

Many thanks,

Tom T

[EMAIL PROTECTED]
http://www.joeaudette.com
http://www.mojoportal.com


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



MySQL Secure Connection(e.g. SSL) Question

2004-08-24 Thread Paul Maine
I need to connect to a remote MySQL database from a PC using SSL. I would
prefer to connect using perl DBD. Does anyone have a suggestion how I can
accomplish this task or an alternative solution?

Thank You


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



MySQL from Python Error

2004-06-26 Thread Paul Maine
I encountered the following error when trying to perform a SQL UPDATE to a
MySQL database table from Python.

I would apprciate any assistance. In the Python code I have tried integer
and decimal format specifiers in addition to the string specifier and
nothing worked.

Traceback (most recent call last):
  File "e:\my_python_scripts\commercecraft.py", line 36, in ?
cursor.execute ("UPDATE product  SET price = '%s' WHERE competitorID=1
AND sku = '%s'",(myprice,mysku))
  File "E:\Python22\Lib\site-packages\MySQLdb\cursors.py", line 95, in
execute
return self._execute(query, args)
  File "E:\Python22\Lib\site-packages\MySQLdb\cursors.py", line 114, in
_execute
self.errorhandler(self, exc, value)
  File "E:\Python22\Lib\site-packages\MySQLdb\connections.py", line 33, in
defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL
syntax.  Check the manual that cor
responds to your MySQL server version for the right syntax to use near
'139.80'' WHERE competitorID=1 AND sk
u = ''50300288''' at line 1")




Describe product;

Field Type  NullKey Default  Extra
    --  --  ---  --
productID int(11)   PRI (NULL)   auto_increment
sku   varchar(50)   YES (NULL)
description   varchar(60)   YES (NULL)
price decimal(7,2)  YES (NULL)
scrape_date   datetime  YES (NULL)
competitorID  int(11)   YES (NULL)



**
import test_iopus
import MySQLdb
import sys
import string


try:
conn = MySQLdb.connect (host = "localhost",
   user = "root",
   passwd = "xyz",
   db = "commerce")
except MySQLdb.Error, e:
print "Error %d: %s" % (e.args[0], e.args[1])
sys.exit (1)

cursor = conn.cursor()
cursor.execute ("SELECT sku FROM product WHERE competitorID=1")
while (1):
   row = cursor.fetchone ()
   if row == None:
   break
   mysku = row[0]
   print mysku
print "%d rows were returned" % cursor.rowcount

result = test_iopus.Scrape(mysku)
price = result.split(" ")
tmpprice =  str(price[0])

conversion = string.maketrans("$"," ")
myprice = tmpprice.translate(conversion)


print myprice

cursor.execute ("UPDATE product  SET price = '%s' WHERE competitorID=1 AND
sku = '%s'",(myprice,mysku))
cursor.close()
conn.close()


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



MySQL Timeout Question

2004-04-14 Thread Paul Maine
I am running MySQL version 4.0.18 on a Windows 2000 server system. If I log
in locally as an administrator and issues a command such as "DESCRIBE TABLE
some_table;" - everything works fine. If I come back at a later time and run
the same command again - it fails because of some type of timeout. If I
immediately execute the same command again - it works. What timeout controls
this behavior?

Thank You,
Paul


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



HOWTO add Primary Key to Existing Table

2004-02-26 Thread Paul Maine
How can I add an auto-incrementing primary key to an existing table?

MySQL version 4.0

Thank You

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



My SQL Database Synchronization Question

2004-02-04 Thread Paul Maine
I have two MySQL databases that are networked together. If changes can be
made independently to each of the databases - what is the best way to
synchronize them? How can I synchronize them in real time? If the network
link goes down, can the synchronizations be placed upon a queue until the
connection is restored

Thank You,
Paul


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



Problem Query - Help Please

2003-08-29 Thread Paul Maine
When I execute the following query I get duplicate product_id's as shown
below:

SELECT * FROM product, product_category_xref, category WHERE
product_parent_id=''
AND product.product_id=product_category_xref.product_id
AND category.category_id=product_category_xref.category_id
AND product.product_publish='Y'
AND product.product_special='Y'  ORDER BY product_name DESC\G


Results ( As you can see product_id 4139 occurs twice and I desire the
product_id's to be unique in this query)

I have also included the descriptions of the tables.

I would appreciate someone assisting me with a query that works correctly.

*** 1. row ***
product_id: 4199
 vendor_id: 1
 product_parent_id: 0
   product_sku: ToBeAs
product_s_desc: Coming Soon! Preorder Today!
A series of essays on the influential thinkers and ideas in modern times.
  product_desc: Coming Soon! Preorder Today!
By R.J. Rushdoony. This monumental work is a series of essays on the
influential thinkers and ideas in modern times. The author begins with De
Sade, who self-consciously broke with any Christian basis for morality and
law. Enlightenment thinking began with nature as the only reality, and
Christianity was reduced to one option among many. It was then, in turn,
attacked as anti-democratic and anti-freedom for its dogmatic assertion of
the supernatural. Literary figures such as Shelly, Byron, Whitman, and more
are also examined, for the Enlightenment presented both the intellectual and
the artist as replacement for the theologian and his church. Ideas, such as
the spirit of the age, truth, reason, Romanticism, persona, and Gnosticism
are related to the desire to negate God and Christian ethics. Reading this
book will help you understand the need to avoid the syncretistic blending of
humanistic philosophy with the Christian faith.
Paperback, 230 pages, and indices.
   product_thumb_image: 62c16392f436313324d9922ecf2f5a30.jpg
product_full_image: d99c1de85355c6bc853102a4d85065b3.jpg
   product_publish: Y
product_weight: 0.
product_weight_uom: pounds
product_length: 0.
 product_width: 0.
product_height: 0.
   product_lwh_uom: inches
   product_url:
  product_in_stock: 0
product_available_date: 0
   product_special: y
   product_discount_id: 0
  ship_code_id: NULL
 cdate: 1057785021
 mdate: 1059273555
  product_name: To Be As God: A Study of Modern Thought Since the
Marquis De Sade
  product_discount_use:
   category_id: 7920cfab5c630ca88ceabcfda6b3848d
product_id: 4199
  product_list: NULL
   category_id: 7920cfab5c630ca88ceabcfda6b3848d
 vendor_id: 1
 category_name: BOOKS
  category_description:
  category_thumb_image: NULL
   category_full_image: NULL
  category_publish: Y
  menu_image_1:
  menu_image_2:
  menu_image_3:
page_image:
 cdate: 1028759226
 mdate: 1028759226
  category_flypage:
   category_browsepage:
*** 2. row ***
product_id: 4139
 vendor_id: 1
 product_parent_id: 0
   product_sku: Victims
product_s_desc: The decline of Americas public education - how and
why.
  product_desc: By Samuel L. Blumenfeld. Americas most
effective critic of public education shows us how Americas public schools
were remade by educators who used curriculum to create citizens suitable for
their own vision of a utopian socialist society. This collection of essays
will show you how and why Americas public education declined. You will see
the educator-engineered decline of reading skills. The author describes the
causes for the decline and the way back to competent education methodologies
that will result in a self-educated, competent, and freedom-loving populace.
Paperback, 266 pages, and index.
   product_thumb_image: 63ad73b92ddd18d83eb6942914bcf277.jpg
product_full_image: 1440c376576aba8783f183ff145c248b.jpg
   product_publish: Y
product_weight: 0.
product_weight_uom: pounds
product_length: 0.
 product_width: 0.
product_height: 0.
   product_lwh_uom: inches
   product_url:
  product_in_stock: 0
product_available_date: 0
   product_special: y
   product_discount_id: 0
  ship_code_id: NULL
 cdate: 1056405288
 mdate: 1061947639
  product_name: The Victims of Dick and Jane
  product_discount_use:
   category_id: 7920cfab5c630ca88ceabcfda6b3848d
product_id: 4139
  product_list: NULL
   category_id: 7920cfab5c630ca88ceabcfda6b3848d
 vendor_id: 1
 category_name: BOOKS
  category_description:
  category_thumb_image: NULL
   category_full_image: 

MySQL comments question

2002-11-05 Thread Paul Maine
I would like to create a *.sql file that I can later use the SOURCE command
with. I would like to place comments along side the SQL statements for
documentation purposes. Is this possible and if so - how is it done? I don't
want to add comments to a table.

Thank You
Paul
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




Multiple concurrent MySQL question?

2002-09-22 Thread Paul Maine

I desire to configure MySQL in such a way that it will permit me to have two
different PHP/MySQL e-commerce applications running concurrently on my
development system. The table names and table structure are the same on both
applications(and databases). I have received a SQL backup from the new
client and would just like to be able to restore it to a directory and start
up another copy of MySQL and point it to the new location. I know that I
could create two different databases to accomplish what I desire however, I
would have to change all of the security tables for the new database.

What are your suggestions to solve this issue?

Thank You
Paul


-
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: SQL JOIN Challenge - Help Please

2002-08-25 Thread Paul Maine

Thank you very much! This was the precise solution I was looking for.
Brian - I'm sure your method would also work. Thank you both sooo much.

-Original Message-
From: Chris Tucker [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 25, 2002 2:18 PM
To: Brian Moon
Cc: Paul Maine; MySQL MySQL
Subject: Re: SQL JOIN Challenge - Help Please


Actually, you should be able to get the data in one query: in general,
any time you are doing a restriction on some value being in a set of
values (such as order_id not in ) you
can rewrite the query using LEFT OUTER JOIN's.  In this case, the
solution would be something like:

SELECT *
  FROM orders o
   INNER JOIN transaction_log t
   ON o.order_id = t.order_id
  AND t.event_log_id = 1
 LEFT OUTER JOIN transaction_log t2
 ON t.order_id = t2.order_id
AND t2.event_log_id = 3
 WHERE t2.order_id IS NULL;

The way this works is to join across the transaction_log table twice:
first, to retrieve all rows that reference the given order and have an
event log id of 1, and second to retrieve all rows that reference the
given order id and have an event log id of 2.  We then restrict to get
only those rows that do not have valid values in the second join's
results (namely, those transactions that have an event id of 1, from the
initial (inner) join, but do not have a corresponding event id of 3,
from the second (outer) join).

On Sun, 2002-08-25 at 09:43, Brian Moon wrote:
> Ok, I did not make the correlation between what rows you wanted and what
the
> data was.  You are not getting this in one query.  It would require a
> sub-select.  However, simple, but possibly slow queries will get it.
>
> select * from transaction_log where event_log_id=3
>
> get those back and
>
> select order_id from transaction_log where order_id not in ({id list})
>
> The list could be pretty big I guess.
>
> Brian.
>
> - Original Message -
> From: "Paul Maine" <[EMAIL PROTECTED]>
> To: "Brian Moon" <[EMAIL PROTECTED]>; "MySQL MySQL" <[EMAIL PROTECTED]>
> Sent: Sunday, August 25, 2002 7:02 AM
> Subject: RE: SQL JOIN Challenge - Help Please
>
>
> | This is deceptively simple, and I very much appreciate your suggestion -
> but
> | it doesn't work.  Your suggestion still returns records that I should
not
> | see. Once again, there is a one to many relationship between an order_id
> in
> | the order_id in the transaction response table. Please see my original
> | email.
> |
> | Thank you
> | Paul
> | sql query
> | -Original Message-
> | From: Brian Moon [mailto:[EMAIL PROTECTED]]
> | Sent: Sunday, August 25, 2002 12:11 AM
> | To: Paul Maine; MySQL MySQL
> | Subject: Re: SQL JOIN Challenge - Help Please
> |
> |
> | If I read right, this is a pretty basic join so I am assuming that you
> have
> | never done a join in your life.
> |
> | select
> | distinct order.order_id
> | from
> | order
> | inner join
> | transaction_log on
> | order.order_id=transaction_log.order_id and
> | transaction_log.event_log_id <> 3
> |
> | Brian.
> |
> |
> | - Original Message -
> | From: "Paul Maine" <[EMAIL PROTECTED]>
> | To: "MySQL MySQL" <[EMAIL PROTECTED]>
> | Sent: Saturday, August 24, 2002 7:31 PM
> | Subject: SQL JOIN Challenge - Help Please
> |
> |
> | | I have an order table and a transaction log table. The order table has
> an
> | | order_id and a number of other columns that are not germain to my
> | question.
> | | The transaction log has an order_ID and an event_log_id column. The
> order
> | id
> | | from the order table will have a one to many relationship to the
> order_id
> | | data in the transaction log table. The event_log_id is an integer that
> | | assumes a value of 1 if the credit card is authorized, a value of 2 if
> the
> | | credit card is denied or some other type of error, and a value of 3 if
> the
> | | credit card is delay captured.
> | |
> | | I need to create a query that would return all of the order.order_ids
> that
> | | are authorized but have not been delayed captured. How can I
accomplish
> | this
> | | task?
> | |
> | | Thank You
> | | Paul
> | | 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.ph

RE: SQL JOIN Challenge - Help Please

2002-08-25 Thread Paul Maine

This is deceptively simple, and I very much appreciate your suggestion - but
it doesn't work.  Your suggestion still returns records that I should not
see. Once again, there is a one to many relationship between an order_id in
the order_id in the transaction response table. Please see my original
email.

Thank you
Paul
sql query
-Original Message-
From: Brian Moon [mailto:[EMAIL PROTECTED]]
Sent: Sunday, August 25, 2002 12:11 AM
To: Paul Maine; MySQL MySQL
Subject: Re: SQL JOIN Challenge - Help Please


If I read right, this is a pretty basic join so I am assuming that you have
never done a join in your life.

select
distinct order.order_id
from
order
inner join
transaction_log on
order.order_id=transaction_log.order_id and
transaction_log.event_log_id <> 3

Brian.


- Original Message -----
From: "Paul Maine" <[EMAIL PROTECTED]>
To: "MySQL MySQL" <[EMAIL PROTECTED]>
Sent: Saturday, August 24, 2002 7:31 PM
Subject: SQL JOIN Challenge - Help Please


| I have an order table and a transaction log table. The order table has an
| order_id and a number of other columns that are not germain to my
question.
| The transaction log has an order_ID and an event_log_id column. The order
id
| from the order table will have a one to many relationship to the order_id
| data in the transaction log table. The event_log_id is an integer that
| assumes a value of 1 if the credit card is authorized, a value of 2 if the
| credit card is denied or some other type of error, and a value of 3 if the
| credit card is delay captured.
|
| I need to create a query that would return all of the order.order_ids that
| are authorized but have not been delayed captured. How can I accomplish
this
| task?
|
| Thank You
| Paul
| 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
|
|


-
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




MySQL Table alteration question

2002-08-21 Thread Paul Maine

The following table uses order_id as the primary key. My problem is that I
need to be able to change order_id so that it is not a primary key. Next, I
want to add a new auto incrementing key. What sql commands should I use to
first back up the table and then to accomplish this modification. This is a
production table so I must be very careful.


mysql> describe transaction_response;
+---+---+--+-+-+---+
| Field | Type  | Null | Key | Default | Extra |
+---+---+--+-+-+---+
| order_id  | int(11)   |  | PRI | 0   |   |
| result| tinyint(16)   | YES  | | NULL|   |
| pnref | varchar(12)   | YES  | | NULL|   |
| respmsg   | varchar(128)  | YES  | | NULL|   |
| authcode  | varchar(6)| YES  | | NULL|   |
| avsaddr   | char(1)   | YES  | | NULL|   |
| avszip| char(1)   | YES  | | NULL|   |
| timestamp | timestamp(14) | YES  | | NULL|   |
| merchant_name | varchar(20)   | YES  | | NULL|   |
+---+---+--+-+-+---+


Thank You
Paul


-
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




Date comparison assistance please

2002-08-15 Thread Paul Maine

I have a column defined in a table as type date. I desire to include a date
comparison in the WHERE clause of the following statement. The following
statement is not working correctly, I suspect that there is a formatting
issue. The statement returns true even if USER.elig_date has an earlier date
then CURDATE().

Here is my sql query:
select user_id from USER where USER.elig_date >= CURDATE() ;

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




MySQL Error Logs Question

2002-08-04 Thread Paul Maine

How can I set up MySQL error logging? Is there any PHP MySQL error log
parsers?

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




Changing existing column data type question

2002-07-30 Thread Paul Maine

What SQL command can I use to change an existing column in a table with an
integer data type to a varchar data type. This is a production table with
about 3,000 records. I don't want to loose any of my current data in this
column.

Thank You
Paul


-
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




PHP/MySQL Search Engine Query Question

2002-07-27 Thread Paul Maine

I am currently working on a website that is implemented using PHP and MySQL.

The site currently has a simple search engine that allows a shopper to type
in a search string that is stored in $search. For example, if a shopper
types in 1972 Ford Mustang
$string ="1972 Ford Mustang"

Using the following SQL statement:
SELECT * FROM whatevertable WHERE whatevercolumn LIKE '%$search%

Records are returned that have this exact string and in this exact order
(I'm aware a wild card character is included on the front and back of the
string).

My desire is to be able to logically AND each token of the search together
independent or the order of the tokens.
I want to return all records that have Mustang AND 1972 AND Ford.

Since a shopper inputs the search string in advance I don't know how many
tokens will be used.

I would appreciate any suggestions.

Regards,
Paul

-
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




MySQL search question

2002-07-27 Thread Paul Maine

I am currently working on a website that is implemented using PHP and MySQL.

The site currently has a simple search engine that allows a shopper to type
in a search string that is stored in $search. For example, if a shopper
types in 1972 Ford Mustang
$string ="1972 Ford Mustang"

Using the following SQL statement:
SELECT * FROM whatevertable WHERE whatevercolumn LIKE '%$search%

Records are returned that have this exact string and in this exact order
(I'm aware a wild card character is included on the front and back of the
string).

My desire is to be able to logically AND each token of the search together
independent or the order of the tokens.
I want to return all records that have Mustang AND 1972 AND Ford.

Since a shopper inputs the search string in advance I don't know how many
tokens will be used.

I would appreciate any suggestions.

Regards,
Paul


-
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: Grant question

2002-07-24 Thread Paul Maine

I have an existing mysql user that I wish to add the INDEX privilege. Is
there a
command that I can use to add a privilege without first deleting the user
and then recreating with the GRANT command?

Thank You


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 24, 2002 6:27 PM
To: Paul Maine
Subject: Re: Grant question


Your message cannot be posted because it appears to be either spam or
simply off topic to our filter. To bypass the filter you must include
one of the following words in your message:

sql,query

If you just reply to this message, and include the entire text of it in the
reply, your reply will go through. However, you should
first review the text of the message to make sure it has something to do
with MySQL. Just typing the word MySQL once will be sufficient, for example.

You have written the following:

I have an existing user that I wish to add the INDEX privilege. Is there a
command that I can use to add a privilege without first deleting the user
and then recreating with the GRANT command?

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




MySQL Grant Question

2002-07-24 Thread Paul Maine

I have an existing mysql user that I wish to add the INDEX privilege. Is
there a command that I can use to add a privilege without first deleting the
user and then recreating with the GRANT command?

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