Re: [PHP-DB] MySQL to EXCEL?

2004-08-17 Thread Matt M.
I have another option that might work for you also. Go to MySQL's website and grab their ODBC driver and use that to pull data directly into Excel. That's what I do and the end result tends to be a lot cleaner than going through cvs or other MySQL exports. I was not sure that this was

Re: [PHP-DB] MySQL to EXCEL?

2004-08-17 Thread Daniel Brunner
I don't know how you have it setup. But you can create a XLS file on the fly using PHP By using header... header(Content-Type: application/vnd.ms-excel); header(Content-Dispostion: attachemnt; filename='Project.xls'); header(Pragma: no-cache); header(Expires: 0); Then just echo your results

RE: [PHP-DB] MySQL to EXCEL?

2004-08-17 Thread Ed Lazor
-Original Message- From: Daniel Brunner [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 17, 2004 2:45 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL to EXCEL? I don't know how you have it setup. But you can create a XLS file on the fly using PHP By using header

RE: [PHP-DB] MySQL to EXCEL?

2004-08-17 Thread jeffrey_n_Dyke
I don't know how you have it setup. But you can create a XLS file on the fly using PHP By using header... header(Content-Type: application/vnd.ms-excel); header(Content-Dispostion: attachemnt; filename='Project.xls'); header(Pragma: no-cache); header(Expires: 0); Then just

Re: [PHP-DB] mysql query

2004-08-13 Thread Torsten Roehr
Justin Patrin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Fri, 13 Aug 2004 15:20:36 +0200, Quentin Cotillard [EMAIL PROTECTED] wrote: Consider a table similar to the one below. What I want to do is to get ONE random record from categories(cat) A and 5 random record from

Re: [PHP-DB] mysql query

2004-08-13 Thread Justin Patrin
On Fri, 13 Aug 2004 19:39:59 +0200, Torsten Roehr [EMAIL PROTECTED] wrote: Justin Patrin [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Fri, 13 Aug 2004 15:20:36 +0200, Quentin Cotillard [EMAIL PROTECTED] wrote: Consider a table similar to the one below. What I want to do

Re: [PHP-DB] MySQL fulltext search with InnoDB table?

2004-08-04 Thread Brent Baisley
I don't think there is anything you can do that won't require a full table scan. I think some people break out the field they want to do a full text search on into another table using the MyISAM format. So your core table is InnoDB and your full text search fields are in a related table that

Re: [PHP-DB] MySQL software question

2004-07-28 Thread Mikhail U. Petrov
May be ERwin or BPwin can help you. imho ERwin works with MSSQL, Access, so maybe new versions work with MySQL too. Vincent Jordan wrote: Is there a piece of software that will allow my to create MySQL databases and table relations in a graphical format without having to connect to the database?

Re: [PHP-DB] MySQL software question

2004-07-28 Thread dpgirago
I have ERwin 4.1.2208 installed, and it connects to MySQL only through ODBC, so one needs to have the MyODBC.dll installed. You can then make an ODBC connection with it. But ERwin is probably a $4,000.00 software package. Pretty steep for an individual... dave May be ERwin or BPwin can help

RE: [PHP-DB] MySQL software question

2004-07-28 Thread Gilmore, Corey (DPC)
PROTECTED] Sent: Wednesday, July 28, 2004 7:39 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL software question May be ERwin or BPwin can help you. imho ERwin works with MSSQL, Access, so maybe new versions work with MySQL too. Vincent Jordan wrote: Is there a piece of software

Re: [PHP-DB] MySQL software question

2004-07-28 Thread Rory McKinley
Vincent Jordan wrote: Is there a piece of software that will allow my to create MySQL databases and table relations in a graphical format without having to connect to the database? snip Try DB Designer from Fabforce - it has it's idiosyncracies, but it is free, and I use it without major

RE: [PHP-DB] MySQL '!=' ???

2004-07-20 Thread Hutchins, Richard
Tris, Instead of using != in your statement, try using . I looked in my copy of the MySQL Manual and it shows both != and for the not equal concept, but the examples given only show the format used. Not sure if it'll solve the problem, but it's the first thing I'd try. Rich -Original

RE: [PHP-DB] MySQL '!=' ???

2004-07-20 Thread VANDOORINE A RsrhCppRfaRva
there is a better way. Regards, Aurelien Vandoorine -Message d'origine- De : Hutchins, Richard [mailto:[EMAIL PROTECTED] Envoyé : mardi 20 juillet 2004 14:20 À : [EMAIL PROTECTED] Objet : RE: [PHP-DB] MySQL '!=' ??? Tris, Instead of using != in your statement, try using . I looked in my

Re: [PHP-DB] Mysql and rollbacks

2004-07-14 Thread Peter Westergaard
I was about to suggest the same, the latest builds of MySQL have theese functions from what I knew... I think youll find what you need there. Thanks, Kim. Any stable and fairly affordable hosts out there using these latest builds? Mine is back a few, no transactional functionality that I can

Re: [PHP-DB] mysql auto increment

2004-07-13 Thread Peter Westergaard
I've done exactly this for a really cheap-and-dirty instance where two people were doing bulk data entry into two different instances of a mysql table which would eventually be stitched together. by giving one a higher range, the data migration afterwords was very easy. Other than that, can't

Re: [PHP-DB] mysql auto increment

2004-07-13 Thread Jonathan Haddad
There might be some system that requires a 4 digit number and the PK is being used directly. Also, this same system might need to be exported to Excel, which trims leading zeros and is generally a pain in the ass. Peter Westergaard wrote: I've done exactly this for a really cheap-and-dirty

Re: [PHP-DB] Mysql and rollbacks

2004-07-13 Thread John W. Holmes
Peter Westergaard wrote: I'm developing a site where I anticipate the need to make several updates to several forms, and I'll want to commit them all at once (i.e. if there's a failure with any of the transactions, I'd like to be able to back out to before I started). Is there a decent way to do

Re: [PHP-DB] Mysql and rollbacks

2004-07-13 Thread Kim Steinhaug
I was about to suggest the same, the latest builds of MySQL have theese functions from what I knew... I think youll find what you need there. -- Kim Steinhaug - There are 10 types of people when it comes to binary numbers:

Re: [PHP-DB] mysql auto increment

2004-07-12 Thread John W. Holmes
Michael Gale wrote: I know this is more of a mysql question then php with mysql but I can not find the answer. I have a primary key in a table the is setup and working with auto increment. Now I want to change it so it will start auto incrementing from 1000. So each entry will be: First of

Re: [PHP-DB] mysql auto increment

2004-07-12 Thread Jason Wong
On Tuesday 13 July 2004 07:19, Michael Gale wrote: I know this is more of a mysql question then php with mysql but I can not find the answer. www.mysql.com search auto increment http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html Keep reading and re-reading that page until you have

Re: [PHP-DB] mysql auto increment

2004-07-12 Thread Ross Honniball
I just had a bit of a play with it and discovered you can do this: say your auto-increment index is named 'fred' for arguments sake. INSERT INTO table SET FRED = 1000 This will just create a record where the auto-index fred will equal 1000. Next auto-increment, NOT specifying a value for 'fred',

Re: [PHP-DB] MySQL query, using DISTINCT...

2004-07-06 Thread Jason Wong
On Tuesday 06 July 2004 17:58, [EMAIL PROTECTED] wrote: I have a system that tracks downloads, capturing loadsa info, but of interest here, is email and filename. Simply put, I wanna show all results where file name AND email are unique. (so if email '[EMAIL PROTECTED]' has filename 'word.doc'

Re: [PHP-DB] MySQL variable question

2004-07-03 Thread John W. Holmes
Chris Payne wrote: I'm using MySQL 4's built-in Boolean handling abilities with PHP 4 which works wonderfully, but I need to change: ft_min_word_len See here: http://dev.mysql.com/doc/mysql/en/Option_files.html -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

Re: [PHP-DB] Mysql 5.0 Redhat

2004-07-02 Thread Cole S. Ashcraft
You need to compile PHP with MySQL support. There is a php-mysql.rpm package, but I'm not sure if it will work with MySQL 5. You might just have to recompile PHP (but probably not). Cole Iain Wiseman wrote: Cole S. Ashcraft wrote: They are at http://dev.mysql.com/downloads/mysql/5.0.html. Iain

Re: [PHP-DB] mysql limit

2004-06-30 Thread John W. Holmes
Bob Lockie wrote: If I select rows with a limit clause I need to know if there are more rows than the limit. Either do a SELECT COUNT(*) prior to your LIMIT query to see how many total rows there are, or use SQL_CALC_FOUND_ROWS and FOUND_ROWS() (more info here:

Re: [PHP-DB] MySQL: Random select with specific count of a column

2004-06-29 Thread Pablo M. Rivas
Hello Torsten, This is one, but I think you can find another one: Supose your table is called tablename select * from tablename as a left join tablename as b on a.category = b.category and a.nameb.name and a.language=b.language where a.language='de' and b.name is

Re: [PHP-DB] MySQL: Random select with specific count of a column

2004-06-29 Thread Torsten Roehr
Pablo M. Rivas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello Torsten, This is one, but I think you can find another one: Supose your table is called tablename select * from tablename as a left join tablename as b on a.category = b.category and

Re: [PHP-DB] MYSQL Too Many Connections

2004-06-22 Thread Sumito_Oda
Hi, Refer to http://dev.mysql.com/doc/mysql/en/Too_many_connections.html Concretely, the description below is added to the [mysqld] section of my.cnf (my.ini for Windows), and mysqld is rebooted. [mysqld] set-variable=max_connections=500 -- Sumito_Oda mailto:[EMAIL PROTECTED] -- PHP

Re: [PHP-DB] Mysql not receiving the data

2004-06-13 Thread Larry E . Ullman
Online I could see everything, and the pages gave the appearance of working, however when I went into the DB using PHPMYADMIN to check the status of the new data entered, all I found was blank rows ( for the new data since the rebuild, all the old data was there) There were the correct number

RE: [PHP-DB] Mysql not receiving the data

2004-06-13 Thread Andrew Rothwell
] Sent: Sunday, June 13, 2004 11:22 AM To: Andrew Rothwell Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Mysql not receiving the data Online I could see everything, and the pages gave the appearance of working, however when I went into the DB using PHPMYADMIN to check the status of the new data

Re: [PHP-DB] Mysql not receiving the data

2004-06-13 Thread Lester Caine
Andrew Rothwell wrote: Hi Larry, Thank you very much for the very quick response, I set my php.ini file (located /etc/php.ini ) for the register_globals = On (it was off by default) Now however I get an error Error adding entry: You have an error in your SQL syntax near 's spanish driver is found

RE: [PHP-DB] Mysql not receiving the data

2004-06-13 Thread Rich Hutchins
'; Hope this helped. Rich -Original Message- From: Andrew Rothwell [mailto:[EMAIL PROTECTED] Sent: Sunday, June 13, 2004 1:48 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Mysql not receiving the data Hi Larry, Thank you very much for the very quick response, I set my php.ini file (located

Re: [PHP-DB] Mysql not receiving the data

2004-06-13 Thread franciccio
To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Mysql not receiving the data Hi Larry, Thank you very much for the very quick response, I set my php.ini file (located /etc/php.ini ) for the register_globals = On (it was off by default) Now however I get an error Error adding entry: You have an error

RE: [PHP-DB] Mysql not receiving the data

2004-06-13 Thread Andrew Rothwell
you all again Andrew -Original Message- From: franciccio [mailto:[EMAIL PROTECTED] Sent: Sunday, June 13, 2004 12:26 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Mysql not receiving the data I agree, the slashes are killing the query. I would suggets doing this: $add = INSERT

Re: [PHP-DB] Mysql not receiving the data

2004-06-13 Thread Hans Lellelid
Hi Andrew, Andrew Rothwell wrote: Thank you everybody that responded so quickly - I used the suggestion of Franciccio - and the data is now gow into the db Thank you very much - I really appreciate the help. Another question - with this fix in place - do I still need the register_globals = On ? Or

Re: [PHP-DB] Mysql not receiving the data

2004-06-13 Thread franciccio
Some of the reason to have register_global on is to easly use variables sent by post, get, cookie method of a form. Ex. form name=form1 method=post action=anypage.php?get_var=1 input type=text name=text_post value=Hello World input type=submit name=Submit value=Submit /form in your code at

Re: [PHP-DB] MySQL persistent connections

2004-06-13 Thread Michael Gale
Hello, I am no expert but I believe more information is required, like what would be the average return of a mysql operation ? How many different DB's are you accessing ? How many different usernames and passwords for mysql are you using ?? I believe persistent connections are only

Re: [PHP-DB] MySql syntax error using PHPWiki

2004-06-10 Thread Mikhail U. Petrov
Hi! You missed table definition: ... FROM my_table where ... Wednesday, June 9, 2004, 12:57:02 PM, PHPDiscuss wrote: PPNaml Greetings, PPNaml I'm trying to set up a PHPWiki using Apache 2.0.49, PHP 4.3.7, PEAR 4.1.0, PPNaml and PHPWiki 1.3.10. PPNaml I get this error when trying to load

Re: [PHP-DB] mysql adding

2004-06-04 Thread Micah Stevens
update field = field + 1; On Friday 04 June 2004 01:47 pm, Steven Morgan wrote: is there anyway to add 1 to an int with 1 mysql query, i know i can pull the value down with a SELECT then add 1 with php.. then do an UPDATE on it.. but i didn't know if there was any other way? thanks Steve

Re: [PHP-DB] mysql adding

2004-06-04 Thread Micah Stevens
Wait, sorry, It's late.. update tablename set fieldname = fieldname + 1; That will increment all the rows in table, you can add a 'where' statement to limit the update. update tablename set fieldname = fieldname + 1 where indexfield = someindex; -Micah On Friday 04 June 2004 01:47 pm,

Re: [PHP-DB] mysql went away

2004-05-13 Thread Jeffrey Moss
I would start by seeing if the files are there after you create/load the table. It should by default create a file for each table you create. Sounds to me like a problem reading the disk. If you don't find any answers on your own, post your system specs to the MySQL lists. You could also try

Re: [PHP-DB] mysql - SELECT DISTINCT problem

2004-05-08 Thread Daniel Clark
Very odd. I would think it would return every record seeing as the auto_increment ID field is different for every record. I use SELECT DISTINCT tip, marca, model FROM modele to select records without duplicates on the field tip. This works ok, BUT if I use SELECT DISTINCT tip, marca, model, id

Re: [PHP-DB] MySQL Password() PHP encryption?

2004-05-06 Thread John W. Holmes
Theisen, Gary wrote: I've recently upgraded my mysql to v 4.1.1 (on win nt 4.0) and set the Passwords in the user table to the mysql Password() function. Now, this doesn't work anymore when call from a php web script (which is a good thing, cause it's plain text): mysql_connect (localhost,

Re: [PHP-DB] MySQL - counting number of instances of a word in a field

2004-04-28 Thread Ignatius Reilly
Japanese) HTH Ignatius _ - Original Message - From: Gavin Amm [EMAIL PROTECTED] To: Ignatius Reilly [EMAIL PROTECTED] Sent: Wednesday, April 28, 2004 10:03 AM Subject: RE: [PHP-DB] MySQL - counting number of instances of a word in a field Yes, They do. Unfortunately

Re: [PHP-DB] MySQL - counting number of instances of a word in a field

2004-04-28 Thread Ignatius Reilly
The functions do not exist. However, FULLTEXT indexes will do much of this work for you. I encourage you to experiment with them. _ - Original Message - From: Gavin Amm [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 28, 2004 7:18 AM Subject:

Re: [PHP-DB] mysql multi-row insert limitations?

2004-04-16 Thread Bruno Ferreira
Tom Reed wrote: I have a lost of 25,000 unique words and I'd like to insert them into my database. Does anyone know if there is a limit to the number of rows you can insert in one statement? example insert: INSERT INTO table (word) VALUES ('tree'),('book'), 'apple') -- Enter's three rows in the

Re: [PHP-DB] mySQL Parse Error

2004-03-22 Thread jeffrey_n_Dyke
I have a table: CREATE TABLE `cashmire` (`id` smallint(3) unsigned NOT NULL auto_increment, `itemcode` varchar(25) NOT NULL default '', `collection` char(2) NOT NULL default 'cl', `promotion` char(1) default 'n', `bestSeller` char(1) default 'n', `newArrival` char(1) default 'n', `size`

Re: [PHP-DB] mySQL Parse Error

2004-03-22 Thread Terry Riley
Your field name is 'colour', you are inserting into 'color' ? --Original Message- Hi, I have a table: CREATE TABLE `cashmire` (`id` smallint(3) unsigned NOT NULL auto_increment, `itemcode` varchar(25) NOT NULL default '', `collection` char(2) NOT NULL default

Re: [PHP-DB] mySQL Parse Error

2004-03-22 Thread Terry Riley
You are also trying to insert '8400' (characters) into a mediumint (price)? --Original Message- Hi, I have a table: CREATE TABLE `cashmire` (`id` smallint(3) unsigned NOT NULL auto_increment, `itemcode` varchar(25) NOT NULL default '', `collection` char(2) NOT

Re: [PHP-DB] mySQL Parse Error

2004-03-22 Thread John W. Holmes
Nadim Attari wrote: insert into cashmire ('itemcode', 'collection', 'promotion', 'bestSeller', You should not have quotes around the column names. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com

Re: [PHP-DB] mySQL Parse Error

2004-03-22 Thread Nadim Attari
You should not have quotes around the column names. Yea. that was the problem... 'color' a was trivial error ! i got it at home after office hours!!! Seems that a break is necessary when things go wrong !!! Thnx Nadim Attari -- PHP Database Mailing List (http://www.php.net/) To unsubscribe,

RE: [PHP-DB] MySQL category tree db sorting

2004-03-19 Thread Hutchins, Richard
I'd recommend you search the PHP archives for an answer. This question comes up a few times a year and the last time I remember seeing it, somebody (John Holmes, I think) provided an excellent discourse on the different ways to approach this solution. You'll probably get other new responses with

Re: [PHP-DB] MySQL - separating web and database servers

2004-03-19 Thread Matthew Vos
Hi Piotr, Everyone else is suggesting edit all of the code. Alternatively you could setup an iptables rule which forwards all incoming requests on 127.0.0.1:3306 (or whatever port your mysql server is running on) to 192.168.0.1:3306 (repolace 192.168.0.1 wit the IP of your DB server). This way

Re: [PHP-DB] MySQL - separating web and database servers

2004-03-19 Thread Operator
On 19 Mar 2004 at 9:53, Matthew Vos wrote: Hi Piotr, Everyone else is suggesting edit all of the code. Alternatively you could setup an iptables rule which forwards all incoming requests on 127.0.0.1:3306 (or whatever port your mysql server is running on) to 192.168.0.1:3306 (repolace

Re: [PHP-DB] MySQL category tree db sorting

2004-03-19 Thread John W. Holmes
From: Age Bosma [EMAIL PROTECTED] I'm trying to work out what the most efficient way will be to get the complete tree structure from top to bottom of a category tree db. Search the archives or Google for nested sets. That's going to be the most efficient database scheme to use. Any

RE: [PHP-DB] MySQL category tree db sorting

2004-03-19 Thread Galbreath, Mark A
] Sent: Friday, March 19, 2004 11:42 AM To: [EMAIL PROTECTED]; Age Bosma Subject: Re: [PHP-DB] MySQL category tree db sorting From: Age Bosma [EMAIL PROTECTED] I'm trying to work out what the most efficient way will be to get the complete tree structure from top to bottom of a category tree db

Re: [PHP-DB] MySQL - separating web and database servers

2004-03-18 Thread Ricardo Lopes
What is the problem in changig localhost in houndreds of scripts, ou can do that with a script or a good text editor that has the function Replace in Files... can do the trick. I dont think that editing the host file to make localhost point to the other machine is a good practice. :) -

Re: [PHP-DB] MySQL - separating web and database servers

2004-03-18 Thread Operator
On 18 Mar 2004 at 11:15, Ricardo Lopes wrote: What is the problem in changig localhost in houndreds of scripts, ou can do that with a script or a good text editor that has the function Replace in Files... can do the trick. Changing scripts is not a main factor here (but it's not as simple as

Re: [PHP-DB] MySQL - separating web and database servers

2004-03-18 Thread Peter Beckman
Change, in the /etc/hosts file, this: localhost 209.10.33.12# new db server Hopefully this will work. Haven't tested, just a suggestion. Probably breaks a few other things, but at least mysql will work. Beckman On Thu, 18 Mar 2004, Operator wrote: Hi everyone, I need to put my

Re: [PHP-DB] MySQL - separating web and database servers

2004-03-18 Thread Ricardo Lopes
but and least appears to logical and implementable. Good luck. - Original Message - From: Operator [EMAIL PROTECTED] To: PHP DB [EMAIL PROTECTED] Sent: Thursday, March 18, 2004 1:34 PM Subject: Re: [PHP-DB] MySQL - separating web and database servers On 18 Mar 2004 at 11:15, Ricardo Lopes

Re: [PHP-DB] MySQL - separating web and database servers

2004-03-18 Thread Operator
On 18 Mar 2004 at 9:22, Peter Beckman wrote: Change, in the /etc/hosts file, this: localhost 209.10.33.12# new db server Hopefully this will work. Haven't tested, just a suggestion. Probably breaks a few other things, but at least mysql will work. Tested before, doesn't work

RE: [PHP-DB] MySQL Multi-DB Join

2004-03-18 Thread Peter Lovatt
assuming the dtaabases are on the same server $query = select db1.table1.field from db1.table1, db2.table2 where db1.table1.field1 = db2.table2.field2 $result = mysql_query($query,$conection) HTH Peter -Original Message- From: Rod Strumbel [mailto:[EMAIL PROTECTED] Sent: 18

RE: [PHP-DB] MySQL Multi-DB Join

2004-03-18 Thread Rod Strumbel
trying to figure out what that mysql_select_db is doing. Oh, and yes... the databases are on the same server Thanks again, R -Original Message- From: Peter Lovatt [mailto:[EMAIL PROTECTED] Sent: Thursday, March 18, 2004 9:02 To: Rod Strumbel; [EMAIL PROTECTED] Subject: RE: [PHP-DB] MySQL

Re: [PHP-DB] MySQL - separating web and database servers

2004-03-18 Thread Operator
On 18 Mar 2004 at 14:24, Ricardo Lopes wrote: in your php.ini you have mysql.default_host, mysql.default_user and mysql.default_password which are used if: a) you are not in safe mode b) you supply no string for those parameters. But i guess this is not your case, i think this doesnt

Re: [PHP-DB] MySQL - separating web and database servers

2004-03-18 Thread Adam Voigt
I don't understand, your ready to hack the MySQL extension, rather then just use one of the free text editors, that let you mass replace all your pages at once (which takes roughly 10 seconds)? On Thu, 2004-03-18 at 10:15, Operator wrote: Probably I need to change this behaviour in

RE: [PHP-DB] MySQL Multi-DB Join

2004-03-18 Thread Peter Lovatt
: RE: [PHP-DB] MySQL Multi-DB Join ?!? And just use the normal old db selection command for it? Which of the DBs would you select, or does it matter? mysql_select_db($databasename,$dbhandle); Think that is what has been confusing me. If you can select just one db, then what

Re: [PHP-DB] MySQL - separating web and database servers

2004-03-18 Thread John W. Holmes
From: Operator [EMAIL PROTECTED] Probably I need to change this behaviour in ext/mysql/libmysql/libmysql.c for my installation, but this is my last hope (mostly because I'm not a C programist...) If some of you could tell me if it's possible without breaking something else, or point me to

Re: [PHP-DB] MySQL Multi-DB Join

2004-03-18 Thread John W. Holmes
From: Rod Strumbel [EMAIL PROTECTED] If you can select just one db, then what is that select_db command really doing? All it's doing is issuing a USE database query so you can say SELECT * FROM table instead of SELECT * FROM database.table You want to use select_db() so that you don't have

Re: [PHP-DB] MySQL - separating web and database servers

2004-03-18 Thread Justin Patrin
Operator wrote: On 18 Mar 2004 at 14:24, Ricardo Lopes wrote: in your php.ini you have mysql.default_host, mysql.default_user and mysql.default_password which are used if: a) you are not in safe mode b) you supply no string for those parameters. But i guess this is not your case, i think this

Re: [PHP-DB] MySQL - separating web and database servers

2004-03-18 Thread W. D.
At 09:20 3/18/2004, Adam Voigt wrote: I don't understand, your ready to hack the MySQL extension, rather then just use one of the free text editors, that let you mass replace all your pages at once (which takes roughly 10 seconds)? Adam is right. Make backups of all the files, then do the edits.

Re: [PHP-DB] MySql query

2004-03-17 Thread Bruno Ferreira
Matt Matijevich wrote: This is probably a question for for a mysql list but I figured someone out here knows the answer. [snip] SELECT * FROM sometable WHERE 1 SELECT * FROM sometable Just that :) (do I hear you slapping your forehead? :) Bruno Ferreira. --- [This E-mail scanned for viruses

Re: [PHP-DB] MySql query

2004-03-17 Thread Matt Matijevich
snip SELECT * FROM sometable Just that :) (do I hear you slapping your forehead? :) Bruno Ferreira. /snip Thanks for the answers guys. My problem was I am a mysql novice and there was a bunch of existing queries that use the WHERE 1 syntax. -- PHP Database Mailing List (http://www.php.net/)

Re: [PHP-DB] MySql query

2004-03-17 Thread Adam Voigt
Yes, where evaluates to true. On Wed, 2004-03-17 at 12:03, Matt Matijevich wrote: This is probably a question for for a mysql list but I figured someone out here knows the answer. I am working with an existing mysql application and there is a bunch of queries that are formatted something

RE: [PHP-DB] MySql query

2004-03-17 Thread Ryan Jameson (USA)
it simple Ryan -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 17, 2004 10:15 AM To: Matt Matijevich Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySql query Yes, where evaluates to true. On Wed, 2004-03-17 at 12:03, Matt Matijevich wrote

RE: [PHP-DB] MySQL Logging

2004-03-13 Thread Richard Bewley
Hi, You could do something like tail -n25 /var/log/mysqld.log | mail -s Database Logs [EMAIL PROTECTED], and run it in cron. For logging, if you want to log queries, you would use mysqld --log=/var/log/queries.log, but I'm not sure this is the type of logging you're looking for. What might be a

FW: RE: [PHP-DB] MySQL Logging

2004-03-13 Thread Jai Jones
Bewley [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] MySQL Logging Date: Sat, 13 Mar 2004 08:38:48 -0500 Hi, You could do something like tail -n25 /var/log/mysqld.log | mail -s Database Logs [EMAIL PROTECTED], and run it in cron. For logging, if you want to log queries, you would use

Re: [PHP-DB] Mysql MaxDB Support?

2004-03-11 Thread Ricardo Lopes
MaxDB is based on sapdb, try searching for that you probably get better results because sapdb is older that maxdb. In the near future maxdb will support the mysql protocol, so i guess you could then use the mysql functions with maxdb. - Original Message - From: Carolyn Longfoot [EMAIL

Re: [PHP-DB] MySQL query... count?

2004-03-01 Thread Jason Wong
On Monday 01 March 2004 18:53, [EMAIL PROTECTED] wrote: What I need to do for a new report, is say how many downloads were recorded for each Business unit? I can select the Business units using Distinct, but hhow can I then count them? I've tried: SELECT DISTINCT(bu)buname,

Re: [PHP-DB] MySQL query... count?

2004-03-01 Thread Tristan . Pretty
To [EMAIL PROTECTED] cc Subject Re: [PHP-DB] MySQL query... count? On Monday 01 March 2004 18:53, [EMAIL PROTECTED] wrote: What I need to do for a new report, is say how many downloads were recorded for each Business unit? I can select the Business units using Distinct, but hhow can I

Re: [PHP-DB] MySql PHP API

2004-03-01 Thread Doug Thompson
On Mon, 1 Mar 2004 17:16:01 -0800 (PST), Mike Ni wrote: Hey everyone, Does anyone outhere is running Apache/Linux/PHP/Mysql? I am having hard time with MYSQL PHP API. Apache/PHP simply would not recognize any cmysql function call such as mysql_connect. I have recompile the php with mysql

Re: [PHP-DB] MySql PHP API

2004-03-01 Thread Doug
I'm confused. I replied to your inquiry to tell you what information you need to provide if you are to receive help.. Why are you asking me questions about *your* problem? And keep the discussion on the list. Doug Mike Ni wrote: Do you know for certain whether it is a matter of

Re: [PHP-DB] mysql date/time question

2004-01-31 Thread John W. Holmes
js wrote: ok, 2 questions. first, how do i do a mysql query that orders by date? like this? $newestquery = SELECT artid,title,artdate,artauthor FROM article WHERE artdate = $today ORDER BY artdate DESC LIMIT 5; Honestly, you could have taken the two seconds to try that and see if it worked

Re: [PHP-DB] MySQL general Question...

2004-01-16 Thread Alban Médici (NetCentrex)
with the like command you could made search such as : SELECT FROM my_table WHERE 'email' LIKE '[EMAIL PROTECTED]' and you could have several answer. = is for scrict equality [EMAIL PROTECTED] wrote: What's teh diffence between 'LIKE' '=' EG: SELECT FROM my_table WHERE 'email' LIKE

Re: [PHP-DB] MySQL general Question...

2004-01-16 Thread Ignatius Reilly
Standard SQL for comparing strings is LIKE '=' in lieu of 'LIKE' is a MySQL extension to SQL, therefore non-standard. Ignatius _ - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, January 16, 2004 15:39 Subject: [PHP-DB] MySQL general

Re: [PHP-DB] MySQL general Question...

2004-01-16 Thread John W. Holmes
[EMAIL PROTECTED] wrote: What's teh diffence between 'LIKE' '=' EG: SELECT FROM my_table WHERE 'email' LIKE '[EMAIL PROTECTED]' = is an equality (case insensitive). LIKE allows you to use the % character as a wildcard (will match any amount of characters) and the _ character as a wildcard to

Re: [PHP-DB] MySQL Insert

2004-01-07 Thread ma
hi there are several ways of saving the data within a file. you can save it plain or binary. if you want to save a file in the db i suggest using the field-type BLOB short example: to create the table: CREATE TABLE `files` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `fileName`

Re: [PHP-DB] MySQL Insert

2004-01-07 Thread ma
] Datum: Wed, 7 Jan 2004 21:03:40 -0500 An: [EMAIL PROTECTED] Betreff: Re: [PHP-DB] MySQL Insert Thanks!!! :) For getting the info from the database is it like all the rest or is there a certain way to get those types of files from the database? Thanks, ~~Will~~ - Original Message

Re: [PHP-DB] MySQL Insert

2004-01-07 Thread John W. Holmes
Will W wrote: Can anyone tell me how to insert a file, say a .doc, .txt or a .rtf file into a table from an upload form?? How about just this: $query = INSERT INTO Table (orig_name, size, mime_type, data) VALUES ('{$_FILES['userfile']['name']}', '{$_FILES['userfile']['size']}',

Re: [PHP-DB] MySQL Insert via SQL?

2004-01-07 Thread ma
[EMAIL PROTECTED] Antworten an: [EMAIL PROTECTED] Datum: Wed, 07 Jan 2004 21:29:20 -0500 An: Will W [EMAIL PROTECTED] Cc: PHP DB [EMAIL PROTECTED] Betreff: Re: [PHP-DB] MySQL Insert Will W wrote: Can anyone tell me how to insert a file, say a .doc, .txt or a .rtf file into a table from

Re: [PHP-DB] MySQL Insert via SQL?

2004-01-07 Thread John W. Holmes
ma wrote: just a question: don't know it exactly: isn't it possible that the sql-user on the server may not have enough rights to read the file? Yeah, could be. The uploaded file is already somewhere that PHP can write to, though, so it's more than likely available for reading by any other

Re: [PHP-DB] MySQL Insert via SQL?

2004-01-07 Thread ma
An: [EMAIL PROTECTED] Cc: PHP-DB [EMAIL PROTECTED] Betreff: Re: [PHP-DB] MySQL Insert via SQL? ma wrote: just a question: don't know it exactly: isn't it possible that the sql-user on the server may not have enough rights to read the file? Yeah, could be. The uploaded file is already somewhere

Re: [PHP-DB] MySQL: getting latest record

2003-12-14 Thread jeffrey_n_Dyke
you've just about got it in your question. SELECT * FROM MyTable WHERE Field1='test' OR Field2='test2' ORDER BY TIMSTAMP DESC LIMIT 1 hth Jeff

RE: [PHP-DB] mysql + php

2003-12-08 Thread Ryan Jameson (USA)
James, (B (BThe consensus of developers here seems to have been not to store binary objects in the (Bdatabase. Rather store them in the file system and simply store reference records in (Bthe database. It is much easier this way. If doing it differently is not an option (Bfor you

Re: [PHP-DB] mysql + php

2003-12-08 Thread CPT John W. Holmes
From: "Will Contact" [EMAIL PROTECTED] (B (B Now I am programming php+mysql. I put word, excel, mpeg and (B any binaries into (B the mySQL database using php on linux server,But I can take out these (Bbinay (B from mySQL database. I would like to see the files and save my pc from (B

Re: [PHP-DB] MySql backup

2003-11-25 Thread John W. Holmes
Robin Kopetzky wrote: Question - if I stop MySql using WinMySqladmin on NT4.0, will I be able to completely backup the data directory or do I need to do something else? This is a commercial application that I need to backup, so it's mighty darned important. I don't think PHP can stop MySQL...

Re: [PHP-DB] mysql table join

2003-11-20 Thread CPT John W. Holmes
From: Roger Miranda (Sumac) [EMAIL PROTECTED] Is there a way to permanently join/link two mysql tables? Not without creating another table. CREATE TABLE MyTable SELECT ... FROM Table1 JOIN Table2 ON ... WHERE ... Although I have to wonder about your schema if you need to do this. ---John

Re: [PHP-DB] MySQL join with variable table?

2003-11-18 Thread Jason Wong
On Tuesday 18 November 2003 10:00, Jason Godesky wrote: In a MySQL database, I have several tables, including one central table that essentially keeps track of the records in the other tables. TABLE1 +---+---+---+ | id| str |

Re: [PHP-DB] MySQL Query not working via PHP

2003-10-18 Thread Steve Davies
remove the comma after cadet.photo, ie select cadet.relation2,cadet.photo FROM HTH steve Matthew Moldvan, Jr. wrote: I would say try single quotes instead of double quotes ... let me know if that works ... Regards, Matt. - Original Message - From: Sean Smitz [EMAIL

Re: [PHP-DB] MySQL Query not working via PHP

2003-10-18 Thread Sean Smitz
That solved the problem Steve. thanks, Sean Steve Davies [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] remove the comma after cadet.photo, ie select cadet.relation2,cadet.photo FROM HTH steve Matthew Moldvan, Jr. wrote: I would say try single quotes instead of

Re: [PHP-DB] MySQL Query not working via PHP

2003-10-17 Thread Matthew Moldvan, Jr.
I would say try single quotes instead of double quotes ... let me know if that works ... Regards, Matt. - Original Message - From: Sean Smitz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:32 PM Subject: [PHP-DB] MySQL Query not working via PHP I have a

<    1   2   3   4   5   6   7   8   9   10   >