[PHP-DB] mysql - SELECT DISTINCT problem

2004-05-08 Thread mariuspa
Hello, 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 FROM... (id is auto_increment and is the table's primary key) my query won't produce any result. ANyone has a clue?

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[2]: [PHP-DB] mysql - SELECT DISTINCT problem

2004-05-08 Thread mariuspa
This wouldn't be posible either, because the argument for Distinct is tip, so other fields will be ignored. But simply it can't retrieve id. If i want to retrieve it also, it returns zero fields. Thank you anyway. Regards, Marius Panaitescu DC Very odd. I would think it would return every

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

2004-05-06 Thread Theisen, Gary
Hi all, 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, theID,

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: [PHP-DB

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

2004-04-27 Thread Gavin Amm
Hi guys, I'm trying to find a MySQL function(s) that will allow me to count the number of words in a field. For eg: [table: pages] id - title - keywords - body 1 - Home - home, page - This is my home page. p Enjoy your stay. 2 - Feedback - feedback, form, contact - Please enter any feedback

[PHP-DB] mysql foreign key syntax / tutorial

2004-04-21 Thread Uzi Klein
Hi. Any body got an idea how to use hte foreign keys in mysql innodb tables and how whould the change affect the performance of the server? lets say i have Items table, Clients table, and Sales table the Sales table always stores ClientID and ItemID but not every client/item is there a sale can

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

2004-04-16 Thread Tom Reed
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 database? -tom

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

[PHP-DB] mySQL Parse Error

2004-03-22 Thread Nadim Attari
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 '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 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,

[PHP-DB] MySQL category tree db sorting

2004-03-19 Thread Age Bosma
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. Starting with the first main branch listing it's first child branch followed by it's children, after that the second child branch, ect. When the first main

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

2004-03-19 Thread Hutchins, Richard
] Subject: [PHP-DB] MySQL category tree db sorting 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. Starting with the first main branch listing it's first child branch followed by it's children, after

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

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

2004-03-18 Thread Operator
Hi everyone, I need to put my database server on the another machine - how can I configure system(Debian Linux)/php/mysql etc. to make it work without changing all 'localhost' in a hundreds of customer's scripts? The problem is, when localhost is specified as a host the connection is made using

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

2004-03-18 Thread Ricardo Lopes
. :) - Original Message - From: Operator [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 18, 2004 8:57 AM Subject: [PHP-DB] MySQL - separating web and database servers Hi everyone, I need to put my database server on the another machine - how can I configure system(Debian Linux)/php

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

2004-03-18 Thread Operator
to the other machine is a good practice. :) I agree. But it doesn't work anyway ;) PB - Original Message - From: Operator [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 18, 2004 8:57 AM Subject: [PHP-DB] MySQL - separating web and database servers Hi everyone, I

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

[PHP-DB] MySQL Multi-DB Join

2004-03-18 Thread Rod Strumbel
Is there a way through the php mysql commands to join tables between databases? Is simple enough at MySQL command line, but can't for the life of me figure out how to do it in PHP. Thanks all, R

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
March 2004 14:48 To: '[EMAIL PROTECTED]' Subject: [PHP-DB] MySQL Multi-DB Join Is there a way through the php mysql commands to join tables between databases? Is simple enough at MySQL command line, but can't for the life of me figure out how to do it in PHP. Thanks all, R -- PHP

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

[PHP-DB] MySQL Logging

2004-03-13 Thread Jai Jones
Hi, Sorry if this the wrong list, I am a little confused on how to get MySQL logging working, I am hoping some PHP users are doing something like this. I am backing up my MySQL data using a shell script and mysqldump. I would like to be able to send an email notification to myself to know that

RE: [PHP-DB] MySQL Logging

2004-03-13 Thread Richard Bewley
case, you have to restore that data, you just have to remove the date. Hope this helps, Richard -Original Message- From: Jai Jones [mailto:[EMAIL PROTECTED] Sent: Saturday, March 13, 2004 8:13 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] MySQL Logging Hi, Sorry if this the wrong list, I

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

[PHP-DB] Mysql MaxDB Support?

2004-03-11 Thread Carolyn Longfoot
Does PHP natively support MaxDB? I have not seen any mention of it in the manual anywhere. If not and anybody uses ODBC could you kindly post the configuration? Cheers! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Mysql MaxDB Support?

2004-03-11 Thread Ricardo Lopes
PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 11, 2004 8:57 AM Subject: [PHP-DB] Mysql MaxDB Support? Does PHP natively support MaxDB? I have not seen any mention of it in the manual anywhere. If not and anybody uses ODBC could you kindly post the configuration? Cheers! -- PHP

[PHP-DB] mysql only works with no php.ini

2004-03-03 Thread Morris Beverly
Hi, I just tried to disable the short open tags directive and realized I did not have a php.ini file installed. I copied the one listed as php.ini-dist and made the changes I wanted and put it in /etc with php.ini as the name. Now mysql doesn't work and doesn't show up with phpinfo() as it

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

2004-03-01 Thread Tristan . Pretty
This problem pertains to a system that records all downloads from our site: I have a field in my DB, that states which business unit owns the download that was recorded... What I need to do for a new report, is say how many downloads were recorded for each Business unit? I can select the

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

[PHP-DB] MySql PHP API

2004-03-01 Thread Mike Ni
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 extension and th problem continue tobe there. I run the

[PHP-DB] MySQL-4.x.x and md5 password?

2004-02-23 Thread user
Howdy -- The following code bite, works with MySQL-2.x.x but not with MySQL4.x.x. Any suggestions. One other note, I'm using the DBal (database layer) from phpBB forum. TIA, David - login.php - if ( $_SERVER['QUERY_STRING'] == 'logout' ) { setcookie('lb_user', NULL, time(),

[PHP-DB] MySQL MaxDB mode

2004-02-20 Thread Kim Steinhaug
Hello! Ive been studying some of the new features from mySQL and I noticed that the timestamp autoupdate feature doesnt work in MaxDB mode of mySQL. ref : http://www.mysqlfreaks.com/mysql/manual_Reference.html What I wonder is, whats the difference (in short words) of running in MaxDB mode

[PHP-DB] MySQL Update and Sort Queries

2004-02-19 Thread Ng Hwee Hwee
hi all, 1) Question on UPDATE My situation is this: I want to update Table1 with values that can be found in Table2.. in short, I would like to do the following: $query = update Table1, Table2 set Table1.field1 = Table2.field2 where Table1.no = Table2.no; however,

[PHP-DB] MySQL query question

2004-02-13 Thread js
i want to search the table called comments, and i want to count the number of times artid appears. then i want to group them all together, but then i want to order them by most appearances to fewest. so if artid 1 appeared 40 times and it was the most, i want that to be retrieved first. if

[PHP-DB] Mysql and Kerberos

2004-02-09 Thread Ricardo Oliveira
Hi all, Does anyone knows a way to autheticate mysql database usersusing kerberos? I'd like to know if I can use Kerberos to validate the authentication data in the mysql_connect command. Thanks for all help, Ricardo Oliveira

[PHP-DB] Mysql - Optimizing tables for search

2004-02-02 Thread Denzo
How do you optimize a table for search? And do you need to change anything in the php (sql select) to reflect these changes? I heard of creating an index or something, but can someone tell me how this works? Thanks. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP-DB] mysql date/time question

2004-01-31 Thread js
ok, 2 questions. first, how do i do a mysql query that orders by date? like, say i want to have 5 newest members who have signed up? i want it to display only 5 also. how do i do that? like this? $newestquery = SELECT artid,title,artdate,artauthor FROM article WHERE artdate = $today ORDER BY

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

[PHP-DB] MySQL charset Error (CLI / CGI)

2004-01-27 Thread Kai Happe
Situation: The Application is written in php 4.3.4 runs on apache 2.0.45 and uses mySQL 4.1.1. All tables in the database are defined with a charset UTF-8. The Application uses the Apache Module and works very well. Now the application must use coding which is not included, we want to call

[PHP-DB] MySQL general Question...

2004-01-16 Thread Tristan . Pretty
What's teh diffence between 'LIKE' '=' EG: SELECT FROM my_table WHERE 'email' LIKE '[EMAIL PROTECTED]' I've just purchased an E-mail marketing piece of software, and was peakign in the code... Found that... Never seen it before (Have I been living in a box?) Cheers, Tris...

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

[PHP-DB] MySQL Insert

2004-01-07 Thread Will W
Hello Everyone, Can anyone tell me how to insert a file, say a .doc, .txt or a .rtf file into a table from an upload form?? Thanks in advance, ~~Will~~

Re: [PHP-DB] MySQL Insert

2004-01-07 Thread ma
://www.php.net/manual/en/features.file-upload.php hth? greetings -ma # life would be easier, if i knew the source code... Von: Will W [EMAIL PROTECTED] Antworten an: [EMAIL PROTECTED] Datum: Wed, 7 Jan 2004 20:21:15 -0500 An: PHP DB [EMAIL PROTECTED] Betreff: [PHP-DB] MySQL Insert Hello

Re2: [PHP-DB] MySQL Insert

2004-01-07 Thread ma
hi! just to add: use file() only if you run php 4.3.0 or higher. if this is not the case use this syntax (its binary safe): $fp = fopen($_FILES['myFile']['tmp_name'], 'r'); # on windows use 'rb' instead of 'r' $data = fread($fp, file_size($_FILES['myFile']['tmp_name'])); fclose($fp); instead

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

[PHP-DB] MySQL 4.x: Access denied for users when password is set...

2003-12-24 Thread -{ Rene Brehmer }-
Hi gang as subject says ... I've got a pretty weird situation. For all users I create in the 'user' table in 'mysql' DB, if I set a password, that user becomes unable to access any DBs ... it doesn't matter if I set the pw as ASCII or password, still won't allow access... I've tried making

[PHP-DB] MySQL Field length

2003-12-16 Thread Shaun
Hi, What is the maximum length for the name of a column in MySQL? Thanks for your help -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] MySQL: getting latest record

2003-12-14 Thread ShortStay
My application is that I am getting the latest quote for a price where more than one quote may have been made. I've got a timestamp colum and I want to get the latest record where certain columns have certain values. Eg SELECT * FROM MyTable WHERE Field1='test' ...? something about the

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

2003-12-14 Thread jeffrey_n_Dyke
cc: Subject: [PHP-DB] MySQL: getting latest record 12/14/2003 10:47

[PHP-DB] mysql + php

2003-12-08 Thread Will Contact
hi! (B (BI am first question of php in this news group. I would like to ask my (Bquestion about (Bphp + mysql. Now I am programming php+mysql. I put word, excel, mpeg and (Bany binaries into (Bthe mySQL database using php on linux server,But I can take out these binay (Bfrom mySQL

RE: [PHP-DB] mysql + php

2003-12-08 Thread Ryan Jameson (USA)
] (BSent: Monday, December 08, 2003 1:10 PM (BTo: [EMAIL PROTECTED] (BSubject: [PHP-DB] mysql + php (B (Bhi! (B (BI am first question of php in this news group. I would like to ask my question about (Bphp + mysql. Now I am programming php+mysql. I put word, excel, mpeg and any (Bbinaries

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

[PHP-DB] MySql backup

2003-11-25 Thread Robin Kopetzky
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. Any help is appreciated. Robin 'Sparky' Kopetzky Black Mesa

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...

[PHP-DB] MySQL and PHP

2003-11-20 Thread Jose
I'm trying to work with MySQL 4.0.16-standard and PHP php-4.3.4 I'm getting the folowing error: Fatal error: Call to undefined function: mysql_pconnect() in /var/www/html/db_fns.php on line 5 Any Ideas what I am missing in the configuration. If I run phpinfo() I get: System Linux

[PHP-DB] MySQL and PHP

2003-11-20 Thread Jose
I'm trying to connect to a MySQL database. I'm able to do it from mysql, I can see my databases and tables. When I try to see it from php I get the error: Fatal error: Call to undefined function: mysql_connect() in /var/www/html/test2.php on line 3 What I'm missing in the configuration? When

[PHP-DB] mysql table join

2003-11-20 Thread Roger Miranda (Sumac)
Hey everyone.. Is there a way to permanently join/link two mysql tables? Thanks, Roger -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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 |

[PHP-DB] MySQL join with variable table?

2003-11-17 Thread Jason Godesky
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 | val1 | +---+---+---+ |

[PHP-DB] mysql or php calculations required!

2003-10-31 Thread JeRRy
Hi, I have got a written PHP page that feeds most information off a mysql database. But I need some calculations completed either via the php page itself or mysql functions. But let me explain what I want. Maybe I could use a javascript on this but prefer all the code hidden away from the eyes

[PHP-DB] mysql field comparison to multiple variables

2003-10-24 Thread Mike Baerwolf
Hello, I trying to put together a sql statement that will pull records based on a date field. I can't figure out how to compare the date field to multiple php variables. Something like this, WHERE date_field != $date_1 OR $date_2 OR $date_3 etc. etc. Thanks for the help. Mike -- PHP

[PHP-DB] MySQL and multiple statements

2003-10-22 Thread Anton I. Sokolovsky
Hi ! Does anyone know if PHP already supports multiple statements specified in a single query string ? http://www.mysql.com/documentation/mysql/bychapter/manual_Clients.html#C_API_multiple_queries Anton. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

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

2003-10-18 Thread Steve Davies
PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 17, 2003 4:32 PM Subject: [PHP-DB] MySQL Query not working via PHP I have a query that works in MySQL but when I try to execute it in PHP I encounter the following error: //Generated by the script Couldn't execute query! // Generated by MySQL

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

2003-10-18 Thread Sean Smitz
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 query that works in MySQL

[PHP-DB] MySQL Query not working via PHP

2003-10-17 Thread Sean Smitz
I have a query that works in MySQL but when I try to execute it in PHP I encounter the following error: //Generated by the script Couldn't execute query! // Generated by MySQL MySQL reports: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for

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

FRe[2]: [PHP-DB] MySQL Regular expression

2003-10-10 Thread Rory McKinley
[EMAIL PROTECTED] To: Rory McKinley [EMAIL PROTECTED] Sent: Thursday, October 09, 2003 6:22 PM Subject: Re[2]: [PHP-DB] MySQL Regular expression Actually in response to my previous comment, would the following achieve wwhat I want? ... and strcmp('$foot_budget', substring_index

Re: FRe[2]: [PHP-DB] MySQL Regular expression

2003-10-10 Thread O Franssen
Thanks very much for your help Rory. :) -- Regards, Owen Franssen Twisted Designmailto:[EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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