Re: [PHP-DB] mysql wildcard

2003-01-08 Thread Marco Tabini
You probably want something like: select * from offtime where type like '{$type}%' As a side note, are you making sure that $type does not contain any malicious code? Cheers, Marco -- php|architect - The Monthly Magazine for PHP Professionals Come check us out on the web at h

Re: [PHP-DB] mysql wildcard

2003-01-08 Thread Brad Bonkoski
Well, if that is your only condition, why not use: 'select * from offtime' as your query? I believe the % as a wildcard is standard SQL, so I would *think* it should work in mysql, have you tried it? -Brad Edward Peloke wrote: > I have an query: > > select * from offtime where type='$type' > >

Re: [PHP-DB] mysql wildcard

2003-01-08 Thread Jim Hunter
If you want all records, remove the where clause. select * from mytable Jim ---Original Message--- From: Edward Peloke Date: Wednesday, January 08, 2003 02:03:04 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] mysql wildcard I have an query: select * from offtime where

[PHP-DB] mysql wildcard

2003-01-08 Thread Edward Peloke
I have an query: select * from offtime where type='$type' then I just pass the type variable to the page. Is there a wildcard in mysql like there is in sqlserver that I can use to grab all the records? such as select * from offtime where type='%' would grab all. Thanks, Eddie -- PHP Database

Re: [PHP-DB] mysql time format

2003-01-07 Thread David Chamberlin
Paul Burney wrote: Why not add the TIME_FORMAT calls to the original query rather than performing all the extra queries? Is your first select something like the following? That's what I'd like to do, but not sure how to do that in this context. SELECT *,TIME_FORMAT(time_column_1,'%whatever

Re: [PHP-DB] mysql time format

2003-01-07 Thread Paul Burney
on 1/6/03 8:24 PM, David Chamberlin at [EMAIL PROTECTED] appended the following bits to my mbox: > Is there any way to set the time format so that any time values in my > SELECT call are in a speicified format (e.g., HH:MM instead of HH:MM:SS). > > Basically I've got a table of a variety of diffe

RE: [PHP-DB] mysql time format

2003-01-06 Thread John W. Holmes
> This is a bit of a newbie question, but I couldn't find what I wanted in > the documentation. > > Is there any way to set the time format so that any time values in my > SELECT call are in a speicified format (e.g., HH:MM instead of HH:MM:SS). > > Basically I've got a table of a variety of diff

[PHP-DB] mysql time format

2003-01-06 Thread David Chamberlin
Hey, This is a bit of a newbie question, but I couldn't find what I wanted in the documentation. Is there any way to set the time format so that any time values in my SELECT call are in a speicified format (e.g., HH:MM instead of HH:MM:SS). Basically I've got a table of a variety of different

[PHP-DB] mySQL sort results (and other) written into a column

2003-01-06 Thread Raphael Pirker
Hi, I know this is OT here, but as a regular reader I thought I'd just drop a line in here since I couldn't find any decent news-community elsewhere. Anyways, here goes my little question that has been troubling me for quite some time now: I have a database that looks somewhat like this: nic

[PHP-DB] mysql ssl client connection via new mysql_connect(...) in php 4.3.0

2003-01-06 Thread Ivan Hoo
hi All, how can i connect to mysql via SSL connection using mysql_connect() in php 4.3.0? i have generated all the certificates necessary and i was able to connect to mysql server via the bin/mysql command line options (below). bin/mysql -h localhost --ssl-cert=host.crt --ssl-key=host.key -u r

RE: [PHP-DB] Mysql Passwprd validation

2003-01-03 Thread Rich Hutchins
Check this resource: http://www.mysql.com/doc/en/Passwords.html Rich -Original Message- From: Sabina Alejandr Schneider [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 8:48 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Mysql Passwprd validation Hello to everybody!! I'm wr

Re: [PHP-DB] Mysql Passwprd validation

2003-01-03 Thread Leif K-Brooks
SELECT * from table where passwordfield=PASSWORD('$variablewithpassword') and username='$usernametocheck' limit 1 Sabina Alejandr Schneider wrote: Hello to everybody!! I'm writing to know if somebody knows how can I validate a password that has been encrypted with the PASSWORD() mysql functio

[PHP-DB] Mysql Passwprd validation

2003-01-03 Thread Sabina Alejandr Schneider
Hello to everybody!! I'm writing to know if somebody knows how can I validate a password that has been encrypted with the PASSWORD() mysql function. Thank you all for your time!!! Sabina Alejandra Schneider [EMAIL PROTECTED]

Re: [PHP-DB] MySQL Database connection Problem

2003-01-03 Thread Jason Wong
On Friday 03 January 2003 17:11, conbud wrote: > Jason Wong wrote: > > On Friday 03 January 2003 17:00, conbud wrote: > >>Hello can someone give me some possible reasons this error happens when > >>I use the mysql client to add a tabe to a database. > >> > >>mysql> create table home (id int not nul

Re: [PHP-DB] MySQL Database connection Problem

2003-01-03 Thread Andrey Hristov
what about the permissions? are they ok? Andrey - Original Message - From: "conbud" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 03, 2003 11:30 AM Subject: Re: [PHP-DB] MySQL Database connection Problem > Andrey thanks, but I seen that a

Re: [PHP-DB] MySQL Database connection Problem

2003-01-03 Thread conbud
Try du to see how much space is free/used > > > Best regards > Andrey Hristov > > > - Original Message - > From: "conbud" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Friday, January 03, 2003 11:11 AM &g

Re: [PHP-DB] MySQL Database connection Problem

2003-01-03 Thread Andrey Hristov
- Original Message - From: "conbud" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, January 03, 2003 11:11 AM Subject: Re: [PHP-DB] MySQL Database connection Problem > Jason Wong wrote: > > On Friday 03 January 2003 17:00, co

Re: [PHP-DB] MySQL Database connection Problem

2003-01-03 Thread conbud
Jason Wong wrote: On Friday 03 January 2003 17:00, conbud wrote: Hello can someone give me some possible reasons this error happens when I use the mysql client to add a tabe to a database. mysql> create table home (id int not null, heading blob not null, -> primary key (id), unique id (id))

Re: [PHP-DB] MySQL Database connection Problem

2003-01-03 Thread Jason Wong
On Friday 03 January 2003 17:00, conbud wrote: > Hello can someone give me some possible reasons this error happens when > I use the mysql client to add a tabe to a database. > > mysql> create table home (id int not null, heading blob not null, > -> primary key (id), unique id (id)); > ERROR 3

Re: [PHP-DB] MySQL Database connection Problem

2003-01-03 Thread Andrey Hristov
Hi, Does mysql user has rights to write in this directory or permissions over this file? Andrey - Original Message - From: "conbud" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 03, 2003 11:00 AM Subject: [PHP-DB] MySQL Database connection

[PHP-DB] MySQL Database connection Problem

2003-01-03 Thread conbud
Hello can someone give me some possible reasons this error happens when I use the mysql client to add a tabe to a database. mysql> create table home (id int not null, heading blob not null, -> primary key (id), unique id (id)); ERROR 3: Error writing file './nrlug/home.frm' (Errcode: 28) Any

RE: [PHP-DB] mysql database not 'taking' changes

2002-12-23 Thread Mark
--- Jody Cleveland <[EMAIL PROTECTED]> wrote: > > Sorry. Stupid technospeak on my part. > > No problem, much ignorance on my part. > > > When you connect to the database, you tell it to use a particular > > username and password. When these new tables were created, did > you > > change the permi

RE: [PHP-DB] mysql database not 'taking' changes

2002-12-23 Thread Jody Cleveland
> Sorry. Stupid technospeak on my part. No problem, much ignorance on my part. > When you connect to the database, you tell it to use a particular > username and password. When these new tables were created, did you > change the permissions in the mysql table for the user, or does that > account

RE: [PHP-DB] mysql database not 'taking' changes

2002-12-23 Thread Mark
Sorry. Stupid technospeak on my part. When you connect to the database, you tell it to use a particular username and password. When these new tables were created, did you change the permissions in the mysql table for the user, or does that account have access to all the tables/databases? Basically

RE: [PHP-DB] mysql database not 'taking' changes

2002-12-23 Thread Jody Cleveland
> Does the user that the script runs as have full CRUD access to the > new tables? Have you set any restrictions on what that user can do to > the table(s)? Boy, do I feel lost... How would I check that? Thanks! Jody -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: ht

Re: [PHP-DB] mysql database not 'taking' changes

2002-12-23 Thread Mark
Does the user that the script runs as have full CRUD access to the new tables? Have you set any restrictions on what that user can do to the table(s)? --- Jody Cleveland <[EMAIL PROTECTED]> wrote: > Hello, > > I'm using a product called Squirrelmail for my web based email. In > it, it > uses a da

[PHP-DB] mysql database not 'taking' changes

2002-12-23 Thread Jody Cleveland
Hello, I'm using a product called Squirrelmail for my web based email. In it, it uses a database for user preferences and address books. (I posted to that list, and it was suggested to check here) I created the database squirrel. I created two tables, one called addresses and one called prefs. For

RE: [PHP-DB] MySQL Ques: default for date field be current date

2002-12-17 Thread John W. Holmes
> I'm trying to convert an ASP/Access tutorial to PHP/MySQL and have a > question regarding MySQL. > > In Access one can create a date field and set the default to "Date()" to > get > the current date but according to the mysql manual: > > http://www.mysql.com/doc/en/CREATE_TABLE.html > > > Defa

Re: [PHP-DB] MySQL Ques: default for date field be current date

2002-12-17 Thread David Smith
This can be done using the 'timestamp' type for your column. Note that this field will be updated to the current time any time the row is modified (including when it is created). An alternative is to do it on the scripting side with the MySQL NOW() command like so: INSERT INTO your_table (field1,

[PHP-DB] MySQL Ques: default for date field be current date

2002-12-17 Thread Michael Zornek
I'm trying to convert an ASP/Access tutorial to PHP/MySQL and have a question regarding MySQL. In Access one can create a date field and set the default to "Date()" to get the current date but according to the mysql manual: http://www.mysql.com/doc/en/CREATE_TABLE.html > Default values must be c

Re: [PHP-DB] mysql-windows xp

2002-12-13 Thread Tyler Whitesides
N (HP-Richardson,ex1)" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, December 13, 2002 6:28 AM Subject: RE: [PHP-DB] mysql-windows xp > I honestly can't give you an answer on that as I haven't installed mysql on > XP. On linu

RE: [PHP-DB] mysql-windows xp

2002-12-13 Thread Edward Peloke
Thanks for all the help. I finally got it running by running winmysqladmin Eddie -Original Message- From: SELPH,JASON (HP-Richardson,ex1) [mailto:[EMAIL PROTECTED]] Sent: Friday, December 13, 2002 9:29 AM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql-

RE: [PHP-DB] mysql-windows xp

2002-12-13 Thread SELPH,JASON (HP-Richardson,ex1)
D]; [EMAIL PROTECTED] Cc: SELPH,JASON (HP-Richardson,ex1) Subject: RE: [PHP-DB] mysql-windows xp by default on a new xp install the firewall is enabled. stops everything on your network from getting thru. if port 3306 is blocked then accessing mysql thru ip would be denied. To disable internet

RE: [PHP-DB] mysql-windows xp

2002-12-13 Thread Edward Peloke
,JASON (HP-Richardson,ex1) Subject: RE: [PHP-DB] mysql-windows xp by default on a new xp install the firewall is enabled. stops everything on your network from getting thru. if port 3306 is blocked then accessing mysql thru ip would be denied. To disable internet connection firewall... I have not

RE: [PHP-DB] mysql-windows xp

2002-12-13 Thread SELPH,JASON (HP-Richardson,ex1)
option to Protect my computer or network. Jason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, December 13, 2002 7:54 AM To: SELPH,JASON (HP-Richardson,ex1) Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql-windows xp that didn&#

RE: [PHP-DB] mysql-windows xp

2002-12-13 Thread Edward Peloke
D] [mailto:[EMAIL PROTECTED]] Sent: Friday, December 13, 2002 8:54 AM To: SELPH,JASON (HP-Richardson,ex1) Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql-windows xp that didn't cause me any issues on my install. why do you have to turn that off. i'm not doubti

RE: [PHP-DB] mysql-windows xp

2002-12-13 Thread Jeffrey_N_Dyke
,ex1)"[EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql-windows xp

RE: [PHP-DB] mysql-windows xp

2002-12-13 Thread Edward Peloke
EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql-windows xp turn off the xp firewall as well. Jason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, December 13, 2002 7:29 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re:

RE: [PHP-DB] mysql-windows xp

2002-12-13 Thread SELPH,JASON (HP-Richardson,ex1)
turn off the xp firewall as well. Jason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, December 13, 2002 7:29 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] mysql-windows xp probably b/c of grants/rights did you run a -- grant

Re: [PHP-DB] mysql-windows xp

2002-12-13 Thread Jeffrey_N_Dyke
cc: Subject: [PHP-DB] mysql-windows xp 12/1

[PHP-DB] mysql-windows xp

2002-12-13 Thread Edward Peloke
I got a new laptop yesterday that has xp home loaded. I installed mysql last night but get errors that I can't connect to 'localhost'. Any ideas? Thanks, Eddie -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] MySQL: FULLTEXT Index

2002-12-09 Thread John Taylor-Johnston
Does anyone know what the maximum is for a FULTEXT Index in MySQL? John -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] MySQL Array

2002-12-06 Thread Ignatius Reilly
o dicefiscale) ."', etc" then mysql_query ( $query ) ; Ignatius - Original Message - From: "Antonio Bernabei" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, December 06, 2002 7:12 PM Subject: Re: [PHP-DB] MySQL Array > Hi, > > I want to in

Re: [PHP-DB] MySQL Array

2002-12-06 Thread Antonio Bernabei
Hi, I want to insert the upper case of the strings written in the forn, so I put on the php file called these lines $NOME=strtoupper($nome); mysql_query ("INSERT INTO anagrafe (codice,nome, cognome, codicefiscale) VALUES ('strtoupper($codicefiscale)','$NOME','strtoupper($cognome)','strtoupper($

Re: [PHP-DB] MySQL Array

2002-12-06 Thread Art Chevalier
creating the connection: > > > > $query = "select server_name from servers where midtier = > > '$server'"; > > $dbResult = mysql_query($query,$dblink); > > > > $c = 1; > > print(""); > > while($row = mysql_fetch_array($dbResult))

RE: [PHP-DB] MySQL Array

2002-12-06 Thread Mark
> print("{$row['server_name']}"); > if(($c % 4) == 0) > { > print(""); > } > } > > > > -Original Message- > From: 1LT John W. Holmes [mailto:[EMAIL PROTEC

RE: [PHP-DB] MySQL Array

2002-12-06 Thread Chevalier, Arthur
4) == 0) { print(""); } } -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 3:26 PM To: Ryan Jameson (USA); Art Chevalier; [EMAIL PROTECTED] Subject: Re: [PHP-D

Re: [PHP-DB] MySQL Array

2002-12-05 Thread 1LT John W. Holmes
} You'll have to account for incomplete rows and clean up the output, but hopefully that gives you an idea. ---John Holmes... - Original Message - From: "Ryan Jameson (USA)" <[EMAIL PROTECTED]> To: "Art Chevalier" <[EMAIL PROTECTED]>; <[EMAIL PROTE

RE: [PHP-DB] MySQL Array

2002-12-05 Thread Aaron Wolski
ECTED] Subject: Re: [PHP-DB] MySQL Array Yes that makes sense, but it is pretty much the same thing I was doing and it's producing the same results. Its basically putting the first element in all 4 table cells. The thing is...I am only selecting from one field. Im trying to get the 4 eleme

Re: [PHP-DB] MySQL Array

2002-12-05 Thread Art Chevalier
hile ($ar = mysql_fetch_array($rs)) echo "". $ar['field1']."".$ar['field2'].""; Make sense? -Original Message- From: Art Chevalier [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 12:44 PM To: [EMAIL PROTECTED] Subject: [P

RE: [PHP-DB] MySQL Array

2002-12-05 Thread Ryan Jameson (USA)
while ($ar = mysql_fetch_array($rs)) echo "". $ar['field1']."".$ar['field2'].""; Make sense? -Original Message- From: Art Chevalier [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 05, 2002 12:44 PM To: [EMAIL PROTECTED] Subjec

[PHP-DB] MySQL Array

2002-12-05 Thread Art Chevalier
Hello, I am pulling one column out of a MySQL table in an array. I want to place each element into a HTML table 4 rows across. I am currently doing this with the mysql_fetch_array() function. How can I pull out 4 array elements in one pass through a while loop? Thanks Art Chevalier -- PHP

[PHP-DB] mysql select last year

2002-12-05 Thread Martin Allan Jensen
Hi all, I have a little problem i know that you can help me with... I have a mysql table +--+ | year | id | + | 2002 | 11 | | 2003 | 11 | | 2004 | 11 | | 2005 | 11 | | 2001 | 12 | | 2002 | 12 | +-+-+ And then i have a loop that takes the year and value fo

Re: [PHP-DB] mysql - enum

2002-12-02 Thread Ruth Zhai
This is what I use: SHOW COLUMNS FROM table LIKE "field" I use the query result for a select field in HTML table. Ruth - Original Message - From: "Bastian Vogt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 02, 2002 11:41 PM Subje

Re: [PHP-DB] mysql - enum

2002-12-02 Thread Ignatius Reilly
DESCRIBE tbl_name col_name Ignatius - Original Message - From: "Bastian Vogt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 02, 2002 1:41 PM Subject: [PHP-DB] mysql - enum > Hi, > > is

[PHP-DB] mysql - enum

2002-12-02 Thread Bastian Vogt
Hi, is it possible to get all possible values of an enum-field from a mysql-table in php? The values might be changed in the database. Now I've got an select-field in my php-app where the user can select each value of the enum-field for a new record befor saving... Thanks for any reply, Bastian

RE: [PHP-DB] mysql problem

2002-11-28 Thread John W. Holmes
:56 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] mysql problem > > Hello all! I am new to php and I am trying to update a mySQL table using > php v4.2.3 for Windows. I am using the command: > > mysql_query("insert into tblquotehits > (qoption,referer,browser,remot

RE: [PHP-DB] mysql problem

2002-11-28 Thread Peter Lovatt
l Arbuckle, Jr. [mailto:[EMAIL PROTECTED]] Sent: 28 November 2002 22:56 To: [EMAIL PROTECTED] Subject: [PHP-DB] mysql problem Hello all! I am new to php and I am trying to update a mySQL table using php v4.2.3 for Windows. I am using the command: mysql_query("insert into tblquotehits (q

[PHP-DB] mysql problem

2002-11-28 Thread Bill Arbuckle, Jr.
Hello all! I am new to php and I am trying to update a mySQL table using php v4.2.3 for Windows. I am using the command: mysql_query("insert into tblquotehits (qoption,referer,browser,remoteaddr,dt) values ($quotetype,$referer,$browser,$remoteaddress,$currentdtstring)",$db); I have read the doc

[PHP-DB] MySQL: charset

2002-11-27 Thread Radovan Radic
Hi How can i change default charset for mysql database. I want to change default charset on cp1251 just for one database 'dblibrary'. I have seen something like mysql --default-character-set=cp1251, but i dont know does it work? Thanks -- PHP Database Mailing List (http://www.php.net/) To uns

[PHP-DB] MySQL/PHP Iterative Tree

2002-11-26 Thread Adam Voigt
Ok, I've been racking my brain trying to figure this one out, so I thought I'd post the question here and see who bytes. =) I have a table: id INTEGER, PRIMARY KEY parentid INTEGER DEFAULT (0) name VARCHAR(32) NOT NULL Ok, and I am using this structure to make a kind of drill down structure, so

[PHP-DB] MySQL 4 Syntax Question

2002-11-25 Thread John Taylor-Johnston
$SQL = "SELECT AU,ST,BT,AT,id FROM ccl.ccl_main WHERE MATCH (AU) AGAINST ('\"Margaret Atwood\"' IN BOOLEAN MODE) ORDER BY id desc"; When I enclose "Margaret Atwood" in double quotes, it's like having no quotes at all. Therefore, it searches for all occurences of Margaret and Atwood. Any inspirat

Re: [PHP-DB] MySQL connectiviy

2002-11-22 Thread Jeremy Wood
Ok i found that package and I also got pgsql working so Ill just use that if I dont ahve any success. Thanks for all the help. Jeremy -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] MySQL connectiviy

2002-11-22 Thread Jeremy Wood
- Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 22, 2002 1:27 PM Subject: Re: [PHP-DB] MySQL connectiviy > On Saturday 23 November 2002 02:34, Jeremy Wood wrote: > > Hello all, > > I'

Re: [PHP-DB] MySQL connectiviy

2002-11-22 Thread Jeremy Wood
No, I was unable to find a new version of it. Is there a version for php 4.2 ? Jeremy -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] MySQL connectiviy

2002-11-22 Thread Jason Wong
On Saturday 23 November 2002 02:34, Jeremy Wood wrote: > Hello all, > I'm new to PHP and would like to start using mySQL (or postgresql) but I > keep having one problem. In a php file i have a simple call to the function > mysql_connect() > > but i constantly get the error > Fatal error: Call to un

RE: [PHP-DB] MySQL connectiviy

2002-11-22 Thread Pedro M. S. Oliveira
out, Pedro -Original Message- From: Jeremy Wood [mailto:[EMAIL PROTECTED]] Sent: sexta-feira, 22 de Novembro de 2002 18:35 To: [EMAIL PROTECTED] Subject: [PHP-DB] MySQL connectiviy Hello all, I'm new to PHP and would like to start using mySQL (or postgresql) but I keep having one problem.

[PHP-DB] MySQL connectiviy

2002-11-22 Thread Jeremy Wood
Hello all, I'm new to PHP and would like to start using mySQL (or postgresql) but I keep having one problem. In a php file i have a simple call to the function mysql_connect() but i constantly get the error Fatal error: Call to undefined function: mysql_connect() MySQL support was installed wi

RE: [PHP-DB] MySQL Problem

2002-11-21 Thread Griffiths, Daniel
the month starts at 1, at the moment I'm just hard coding the month into the statment. -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: 21 November 2002 16:55 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL Problem On Friday 22 November 2002 00:46, Grif

RE: [PHP-DB] MySQL Problem

2002-11-21 Thread Jason Vincent
Still think we need to see the PHP code before determining that it is an SQL problem. Regards, J -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 21, 2002 11:55 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL Problem On Friday 22 November

Re: [PHP-DB] MySQL Problem

2002-11-21 Thread Jason Wong
On Friday 22 November 2002 00:46, Griffiths, Daniel wrote: > the statement runs without errors, its just the output thats wrong (see the > two tables) I'm displaying the results by doing a simple dump of the query, > through my own code and have also tried through phpMyAdmin. Not sure if this coul

RE: [PHP-DB] MySQL Problem

2002-11-21 Thread Griffiths, Daniel
Sent: 21 November 2002 16:41 To: Griffiths, Daniel; PHP List Subject: RE: [PHP-DB] MySQL Problem Maybe I'm missing something - but the MySQL statement looks right ... How are you displaying the results? -Original Message- From: Griffiths, Daniel [mailto:[EMAIL PROTECTED]] Sent: 2

RE: [PHP-DB] MySQL Problem

2002-11-21 Thread Michael Hazelden
Maybe I'm missing something - but the MySQL statement looks right ... How are you displaying the results? -Original Message- From: Griffiths, Daniel [mailto:[EMAIL PROTECTED]] Sent: 21 November 2002 16:37 To: PHP List Subject: [PHP-DB] MySQL Problem Hi, I have a problem with an

[PHP-DB] MySQL Problem

2002-11-21 Thread Griffiths, Daniel
Hi, I have a problem with an MySQL statement that is driving me mad, I'm using php to connect to the database. this is it : - SELECT LINE,SUM(IF(MONTH=2,WB.TEU,0)) AS '2' ,SUM(IF(MONTH=3,WB.TEU,0)) AS '3' ,SUM(IF(MONTH=4,WB.TEU,0)) AS '4' ,SUM(IF(MONTH=5,WB.TEU,0)) AS '5' ,SUM(IF(MONTH=6,WB.T

Re: [PHP-DB] MySql security

2002-11-19 Thread Radovan Radic
> > how i do this in mysql. > > If this is offtopic can someone point me to any mysql newsgroup. > > I would say this is very offtopic, but this query should do the trick: > GRANT select, update, insert ON your_db_name.* TO > your_username@localhost IDENTIFIED BY 'your_password' > Take a look in th

RE: [PHP-DB] MySql security

2002-11-19 Thread Joakim Andersson
> Hi, > > Since i dont know any mysql group, i will try here - it is > anyway related to > php. > When i want to make php/mysql application i have mysql on the > server and i > connect to it with mysql_pconnect("localhost","root","") and it works. > I assume that any user or hacker could connect

[PHP-DB] MySql security

2002-11-19 Thread Radovan Radic
Hi, Since i dont know any mysql group, i will try here - it is anyway related to php. When i want to make php/mysql application i have mysql on the server and i connect to it with mysql_pconnect("localhost","root","") and it works. I assume that any user or hacker could connect to mysql database l

Re: [PHP-DB] MySql Update.

2002-11-12 Thread Marco Tabini
How about: function do_query ($table, $fields, $where) { $sql = 'update ' . $table . ' Set '; foreach ($fields as $k=>$v) $sql = $k . ' = \'' . $v . '\','; return mysql_query ($sql); } Not sure if it adapts 100% to your case but you can probably fix it up..

Re: [PHP-DB] MySql Update.

2002-11-12 Thread Adam Voigt
$query = "UPDATE tablename SET "; foreach($_POST AS $key => $value) $query .= "$key = '$value',"; $query[strlen($query)-1] = ""; $query .= " WHERE id = '$_GET[id]'; Or something? On Tue, 2002-11-12 at 13:58, David Rice wrote: > > > Making an update query that adapts to the number of fie

[PHP-DB] MySql Update.

2002-11-12 Thread David Rice
Making an update query that adapts to the number of fields that are to be updated Is there anyway to do like a for loop to create the values part of the query then combine it with the first part of the string. something like what i have below... although something that works correctly as thi

[PHP-DB] MySql limits - WAS [PHP-DB] ROugh idea of speed

2002-11-11 Thread Peter Lovatt
Hi I am interested in the limits of MySql. I have a site which is growing. The biggest tables are currently about 750K but this will grow to the 3-10M record mark over the next 6 months. The databases are well designed and are currently running smoothly on 2x1GHz PIII and 512MB RAM. I am plannin

Re: [PHP-DB] MySQL password protection?

2002-11-07 Thread Adam Voigt
Make the include file (or wherever your page with the pass is) encrypted, see ioncube.com they charge by the amount of code you incrypt, for a simple database include file, I think it would be $1 or less. On Wed, 2002-11-06 at 16:04, William Trappeniers wrote: > Hi all > > I was wondering if it i

Re: [PHP-DB] MySQL password protection?

2002-11-06 Thread Dave Smith
One thing I do with Postgres that I'm not sure MySQL supports is Kerberos5 authentication. This way, a user logs in (and they have a user account on the DB) and I use their remote user name and their Kerberos ticket to authenticate them to the DB. That works without having to store a password a

RE: [PHP-DB] MySQL password protection?

2002-11-06 Thread Josh Johnson
PROTECTED] Subject: Re: [PHP-DB] MySQL password protection? Create a user "nobody" with no password and give that user select, update, delete and insert capabilities in your DB and can only connect from localhost (or a certain host). This way they have to be on localhost in order to gain

RE: [PHP-DB] MySQL password protection?

2002-11-06 Thread Josh Johnson
The standard apache install filters anything named .ht*. on the web tree. -- Josh -Original Message- From: Peter Beckman [mailto:beckman@;purplecow.com] Sent: Wednesday, November 06, 2002 6:44 PM To: Steve Cayford Cc: [EMAIL PROTECTED]; William Trappeniers Subject: Re: [PHP-DB] MySQL

Re: [PHP-DB] MySQL password protection?

2002-11-06 Thread Peter Beckman
And make sure you make sure the webserver will not SERVE that file!!! You see the source, see that you are fopening the file, I'll find it on your system and get it from the web server and I have your password! Make sure the file is NOT in the document root that the web server serves from. You c

Re: [PHP-DB] MySQL password protection?

2002-11-06 Thread Peter Beckman
Create a user "nobody" with no password and give that user select, update, delete and insert capabilities in your DB and can only connect from localhost (or a certain host). This way they have to be on localhost in order to gain access to your tables, and only then be able to do what your nobody u

RE: [PHP-DB] MySQL password protection?

2002-11-06 Thread Marco Tabini
fo in it. -Original Message- From: 1LT John W. Holmes [mailto:holmes072000@;charter.net] Sent: Wednesday, November 06, 2002 4:16 PM To: William Trappeniers; [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL password protection? > I was wondering if it is possible to protect my passwor

Re: [PHP-DB] MySQL password protection?

2002-11-06 Thread 1LT John W. Holmes
AIL PROTECTED]> To: "'1LT John W. Holmes'" <[EMAIL PROTECTED]>; "William Trappeniers" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, November 06, 2002 5:30 PM Subject: RE: [PHP-DB] MySQL password protection? > actually you can make a

Re: [PHP-DB] MySQL password protection?

2002-11-06 Thread Steve Cayford
You could put it anywhere. Stick it in a text file somewhere, fopen() and read the file for the password. Or keep it in a php script outside of the web root if that's the issue, then just include() it when you need to. Of course any file you put it in will have to be readable by whatever user

RE: [PHP-DB] MySQL password protection?

2002-11-06 Thread SELPH,JASON (HP-Richardson,ex1)
72000@;charter.net] Sent: Wednesday, November 06, 2002 4:16 PM To: William Trappeniers; [EMAIL PROTECTED] Subject: Re: [PHP-DB] MySQL password protection? > I was wondering if it is possible to protect my password to the MySQL-server > from being in a PHP-script. Now I can't do that,

Re: [PHP-DB] MySQL password protection?

2002-11-06 Thread 1LT John W. Holmes
> I was wondering if it is possible to protect my password to the MySQL-server > from being in a PHP-script. Now I can't do that, so everybody who gets to > see my php-sourcecode also can see my (not protected/not encrypted) > password. > How can I change this? You can't, unless you want to put i

[PHP-DB] MySQL password protection?

2002-11-06 Thread William Trappeniers
Hi all I was wondering if it is possible to protect my password to the MySQL-server from being in a PHP-script. Now I can't do that, so everybody who gets to see my php-sourcecode also can see my (not protected/not encrypted) password. How can I change this? Thanks, William --- William Trappen

Re: [PHP-DB] Mysql too many connections?

2002-10-28 Thread Rasmus Lerdorf
Of course, there is a command-line startup option to set it. Or set it in your my.cnf file. On Mon, 28 Oct 2002, Leif K-Brooks wrote: > Is there any way to change how many connections mysql allows? I keep > getting the too many connections error... (not using pconnect) > > -- > The above messag

[PHP-DB] Mysql too many connections?

2002-10-28 Thread Leif K-Brooks
Is there any way to change how many connections mysql allows? I keep getting the too many connections error... (not using pconnect) -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP Da

[PHP-DB] MySQL crypt test...

2002-10-23 Thread NIPP, SCOTT V (SBCSI)
I am having trouble with a "canned" calendar application and I think that maybe the problem is the crypt function. Does anyone know of a good way to test the crypt function? I need to figure out somehow if this is the source of the problem or not. Thanks. Scott Nipp Phone: (214) 858-12

Re: [PHP-DB] MySql and displaying only yesterday's records

2002-10-21 Thread Jason Wong
On Monday 21 October 2002 22:07, lallous wrote: > TO_DAYS() applied on datetime field is returning different values on > different times but same date! > > How can I pass to TO_DAYS() only the DATE part of my datetime field? As far as I can tell, TO_DAYS() does only use the DATE part regardless wh

RE: [PHP-DB] MySql and displaying only yesterday's records

2002-10-21 Thread John W. Holmes
> Given a datetime field in a MySql database, how can i list all the records > that are dated back to yesterday or to 'N' days in the past? SELECT * FROM your_table WHERE TO_DAYS(date_column) = TO_DAYS(CURRENT_DATE) - N Where N is how many days you want to go back. ---John Holmes... -- PHP D

[PHP-DB] MySql and displaying only yesterday's records

2002-10-21 Thread lallous
Hello, Given a datetime field in a MySql database, how can i list all the records that are dated back to yesterday or to 'N' days in the past? Thanks, Elias -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] MySQL Insert Select statement

2002-10-19 Thread Jeffrey_N_Dyke
<[EMAIL PROTECTED]> 10/19/2002 08:32 PM cc: Please respond to Subject: Re: [PHP-DB] MySQL Insert Select stateme

<    5   6   7   8   9   10   11   12   13   14   >