Re: Can a row be refered using row number?

2006-08-11 Thread Andrew Kreps
The reason for this is probably because the original poster inherited a database without a primary key, and now needs to make edits to it. That happened to me with Oracle once, and I was lucky enough to be able to use Oracle's rowid, which is a unique reference to the row that is independent of th

Re: Is it possible to combine mysql with nis?

2006-07-19 Thread Andrew Kreps
I'm far from an expert on the subject, but judging by a quick Google search for 'NIS mysql backend', people have been able to do this via OpenLDAP. I just thought I'd send you a starting point. On 7/19/06, Cheng-Lin Yang <[EMAIL PROTECTED]> wrote: Hi all, I'd like to know if it's possbile to ma

Re: How to look for balanced parenthesis?

2006-07-11 Thread Andrew Kreps
As of Ultraedit version 12, it's not quite transparent, but it's pretty close. If you Open a file from FTP (File menu option), and hit save, it will automatically upload the file to the server. It's a little slow on the save (as in hit save and count to 10), but it does the job well. Ultraedit

Re: slashes in update statement

2004-11-04 Thread Andrew Kreps
On Wed, 3 Nov 2004 08:31:18 -0500 (EST), Ed Curtis <[EMAIL PROTECTED]> wrote: > > I'm trying to get a slash in a variable into my database and am having > some trouble. If the variable = "1 1/2" it echoes to the screen correctly > but it seems to strip the 1/2 off the variable when updating the va

Re: Newbie question - Input limitations on mysql client?

2004-09-29 Thread Andrew Kreps
On Wed, 29 Sep 2004 10:05:29 -0400, Ted Byrne <[EMAIL PROTECTED]> wrote: > > Is the apparent line length limit a restriction imposed by the client? (And > does it apply if you are piping or redirecting output from another process > or a file?) > It sounds like you should either be using a script

Re: Having rows or fields that can't be modified once entered (NOT grant statement).

2004-09-23 Thread Andrew Kreps
On Thu, 23 Sep 2004 08:20:39 -0400, Jesse W. Asher <[EMAIL PROTECTED]> wrote: > > Thanks for the responses, but this isn't what I'm looking for. I'm > looking for a way to make a field or record unchangeable for ANYONE, > including the system administrator. That way, I can have a fairly high > l

Date Indexing

2004-09-22 Thread Andrew Kreps
Hey all, I have a question about indexing part of a date field. I have a query that I run on a regular basis to retrieve monthly sales numbers: SELECT SUM(OrderSubTotal) FROM tblOrders WHERE DATE_FORMAT(ShipDate, '%Y-%m') = '2004-09'; ShipDate is a date field. My question is how I can phrase th

Re: auto increment fields

2004-09-19 Thread Andrew Kreps
On Sun, 19 Sep 2004 23:59:02 +0300, Mike <[EMAIL PROTECTED]> wrote: > hi. > I have a rather childish question on tables and auto increment fields. > Scenario: I have a table with an field. The > deal is that everything works fine (I'm talking about the auto > incrementation part) > until I choose

Re: Query question

2004-09-19 Thread Andrew Kreps
On Sat, 18 Sep 2004 23:57:59 +0200, Schalk Neethling <[EMAIL PROTECTED]> wrote: > If I submit the following query: > > SELECT * FROM mi_verdicts_search WHERE doctype = 'Verdict' AND (state = > 'California: State Court' OR district = 'Circuit Court: Federal, Alaska' > OR appellate = 'US Supreme Cou

Query takes terribly long

2004-09-18 Thread Andrew Kreps
On Sat, 18 Sep 2004 22:25:12 +0200, Dirk Schippers <[EMAIL PROTECTED]> wrote: > > with indexes: id = primary, putdatetime, userid, > {put,front,topcategory,approvedby} and review. > > If I want to know the 30 most recently added and approved items, I do > the following simple query: > SELECT id FRO

Re: Update select fields in all rows

2004-09-13 Thread Andrew Kreps
On Tue, 14 Sep 2004 01:07:53 -0400, Seth <[EMAIL PROTECTED]> wrote: > I am fairly new to MySQL and I have been trying to form a way to have select rows > numbers put back to 0, sort of like a reset in some rows of the table. > > The table is ladder_1 and I am trying to have the fields > rank,lra

Re: strange group/max date question...

2004-09-10 Thread Andrew Kreps
Have you tried this: select ..., max(date) as mdate from ... where ... group by ... order by mdate desc ? I haven't tested it, but it should order the results by max date descending, giving you the greatest date first. On Fri, 10 Sep 2004 18:16:00 -0700, bruce <[EMAIL PROTECTED]> wrote: > hi...

Re: Analyze Dreaweaver's PHP/MySQL code

2004-09-10 Thread Andrew Kreps
You have a pretty good handle on what's happening there, I hope I can add some clarity. The Resource Id you're trying to echo is a pointer to a MySQL result set, you aren't actually working with the data yet. That's where the mysql_fetch functions come in. The mysql_fetch_assoc function fetches

Re: Keyword Searches

2004-09-10 Thread Andrew Kreps
I've recently been doing a lot of work on keyword searches. The methodology I've adopted consists of generating a list of keywords based on the product information (while removing noise words), and creating a table with one keyword per line, relating to the product ID (many rows per product). The