RE: [PHP-DB] Re: NEWBIE - Needs Assistance with Joins

2001-09-17 Thread Rick Emery
SELECT artist_name, album_title FROM album_titles LEFT JOIN artist USING(aid) WHERE artist_id = aid -Original Message- From: Michael Egan [mailto:[EMAIL PROTECTED]] Sent: Monday, September 17, 2001 8:22 AM To: [EMAIL PROTECTED]; Cecily Walker Kidd Subject: [PHP-DB] Re: NEWBIE - Needs Assi

RE: [PHP-DB] Quotes, double-quotes, and the like.

2001-09-17 Thread Rick Emery
If the essays will be long, I'd suggest storing them in separate files and storing the file name for each essay in the MySQL database. -Original Message- From: Ari M. Roth [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 16, 2001 3:15 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Quotes, d

RE: [PHP-DB] Cookies ???

2001-09-17 Thread Rick Emery
Q1. If you simply wish to READ the cookie from each web page, you need do nothing. It is created atuomatically as a variable for you. For instance, a cookie named "mycookie" is available as $mycookie. Q2. The Cookie Path is the reference point on the web server. I creates a context for the c

RE: [PHP-DB] Help Please! Complex AND OR LIKE queries MySQL/PHP

2001-09-18 Thread Rick Emery
Just use PHP's string searching functions. I had a similar situation where I was inserting user-provided data into a MySQL database. I searched for MySQL "bad words" that I didn't want a hacker to insert into queries, such as DELETE, ADD, INSERT, MODIFY, etc. to prevent mischief. FYI, you can d

RE: [PHP-DB] problemhandling form variables

2001-09-18 Thread Rick Emery
When you printed the string $imgupload, what were its contents? -Original Message- From: Todd Moy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 18, 2001 12:40 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] problemhandling form variables I have an upload field on a form that is optiona

RE: [PHP-DB] Renaming a database name...

2001-09-19 Thread Rick Emery
There is no command to do so. Have you tried simply renaming the files and sub-directory where the database files are located? I've not tried that. -Original Message- From: Arief Fajar Nursyamsu [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 5:05 PM To: PHP-DB Subject: [

RE: [PHP-DB] Cookies ???

2001-09-19 Thread Rick Emery
He's not trying to set multiple cookies...only one. -Original Message- From: Mark Collin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 18, 2001 4:01 PM To: Rick Emery; 'Jason Caldwell'; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Cookies ??? instead of setting multip

RE: [PHP-DB] Query construction

2001-09-19 Thread Rick Emery
When you printed-out the string variable containing the SELECT statement, what did it look like? -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:01 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Query construction Hi there: Further to

RE: [PHP-DB] uploading and stuff

2001-09-19 Thread Rick Emery
Did you look at Chapter 19 of the PHP manual? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 8:54 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] uploading and stuff Hello there... I want to upload textfiles and store them in my TEXT

RE: [PHP-DB] uploading

2001-09-19 Thread Rick Emery
PHP manual, chapter 19 -Original Message- From: its me [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 8:27 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] uploading i want the user to upload files to server when i worked offline i used to write: $updir = "C:\apache\htdocs\mal

RE: RE: [PHP-DB] Query construction

2001-09-19 Thread Rick Emery
Wednesday, September 19, 2001 9:19 AM To: Rick Emery Cc: [EMAIL PROTECTED] Subject: Re: RE: [PHP-DB] Query construction If you mean did the pattern I'm trying to match: $team, contain what I though it should: 'footballSat' then yes it did. I also receieve no error message from MySQl

RE: RE: RE: [PHP-DB] Query construction

2001-09-19 Thread Rick Emery
9, 2001 9:33 AM To: Rick Emery Cc: [EMAIL PROTECTED] Subject: Re: RE: RE: [PHP-DB] Query construction I'm sorry but I must be missing something fundamental here. This is how my code looks, and if the SQL query yields nothing and emits no error (as it currently is) it simply reverts to err

RE: [PHP-DB] Query construction

2001-09-19 Thread Rick Emery
YES!!! Exactly Russ...do what Steve syas... -Original Message- From: Steve Cayford [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:32 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Query construction Usually what I do when I'm having this type

RE: RE: [PHP-DB] Query construction

2001-09-19 Thread Rick Emery
ll [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 19, 2001 9:56 AM To: Rick Emery Cc: [EMAIL PROTECTED] Subject: Re: RE: [PHP-DB] Query construction Ok ok ok!! Thank you both for the pointers, they did of course yield the problem - as bloody always it's something completely different

RE: [PHP-DB] Re: log out

2001-09-19 Thread Rick Emery
the header() function MUST be sent prior to any other output. Otherwise, it will fail. What else in the page precedes the header()? - On 9/12/01 5:54 AM, in article [EMAIL PROTECTED], "Its Me" <[EMAIL PROTECTED]> wrote: > session_start(); > session_

RE: [PHP-DB] MySQL Query Weirdness

2001-09-21 Thread Rick Emery
easier solution: while ($line = mysql_fetch_array($result)) { print "\t\n\t\t".$line['first_name']."\n\t\n"; } -Original Message- From: Steve Cayford [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 20, 2001 5:16 PM To: Chris S. Cc: [EMAIL PROTECTED] Subject: Re:

RE: [PHP-DB] How to do this with PHP

2001-09-21 Thread Rick Emery
SELECT * FROM mytable LIMIT 0,5 SELECT * FROM mytable LIMIT 6,5 SELECT * FROM mytable LIMIT 11,5 SELECT * FROM mytable LIMIT 16,5 -Original Message- From: Alawi Albaity [mailto:[EMAIL PROTECTED]] Sent: Friday, September 21, 2001 1:44 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] How to do th

RE: [PHP-DB] Grant statement

2001-09-24 Thread Rick Emery
no, if all you wan the user to do is to read/write data -Original Message- From: its me [mailto:[EMAIL PROTECTED]] Sent: Monday, September 24, 2001 5:03 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Grant statement GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON database_name.*

RE: [PHP-DB] Re: mysql_fetch_array() doesn't work

2001-09-25 Thread Rick Emery
I agree with Steve. Also, print value of $num; is it 0? Is $res valid; is it NULL? We need far more details than what you think we need. -Original Message- From: Steve Brett [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 25, 2001 6:34 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re:

RE: [PHP-DB] warning/error

2001-09-25 Thread Rick Emery
show us code -Original Message- From: Wild ! [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 25, 2001 3:01 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] warning/error I get the following error: Warning: Supplied argument is not a valid MySQL result resource in /usr/local/www/htdoc

RE: [PHP-DB] how do I update fields in a mysql database with php?

2001-09-26 Thread Rick Emery
Wht is the error message you get? What does the table look like? what does the preceding code loo like? show us code!!! show us output!!! -Original Message- From: Tommy Nilsson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 26, 2001 11:10 AM To: [EMAIL PROTECTED] Subject: [PHP-D

RE: [PHP-DB] delete multiple entries from a database using PHP

2001-09-26 Thread Rick Emery
It depends upon the criteria you set for the delete (but you've already investigated that). What is the REAL problem? What are you trying to delete? What does table look like and by which criteria are you deleting? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Se

RE: [PHP-DB] Huw do I perform update? I missed the accual code bit.. sorry

2001-09-26 Thread Rick Emery
What does table look like? What does preceding code look like? What error message are you getting? Try printing the value of $query. What does it look like? Copy/paste that into mysql directly; what error do you get? -Original Message- From: Tommy Nilsson [mailto:[EMAIL PROTECTED]] Sen

RE: [PHP-DB] More info..

2001-09-26 Thread Rick Emery
try executing the query string directly in the mysql command line. What happens? -Original Message- From: Tommy Nilsson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 26, 2001 11:53 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] More info.. Hi. I get no error, it works fine. I get a

RE: [PHP-DB] Update... more info

2001-09-26 Thread Rick Emery
are you saying the table is updated properly? -Original Message- From: Tommy Nilsson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 26, 2001 12:04 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Update... more info If i put the code into mysql directly it says it works nicely, so the

RE: [PHP-DB] mysql_fetch_array() doesn't work

2001-09-27 Thread Rick Emery
change coding to (note, each line is enclosed in quotes and ends withn "."): $query="select user_id, user_name, time, status, comment from users". "where sign=1". "order by user_name". "limit $offset, $step"; print $query; //sanity check...contents of $query $res=mysql_query($query) or die(mysql

RE: [PHP-DB] create data array

2001-09-27 Thread Rick Emery
the following assumes you've opened database. $query = "SELECT TextVal,Val1,Val2,Val3 FROM mytable WHERE some_condition"; $result = mysql_query($query) or die(mysql_error()); $mycmd = "\$data_array = array ("; while( $row = mysql_fetch_array($result) ) { $mycmd .= "array(\"".$row['TextVal

RE: [PHP-DB] Hellllp DBF

2001-09-27 Thread Rick Emery
sounds like database manipulation was not compiled into PHP when it was installed on your server. -Original Message- From: Marcelo Ramos Souza [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 27, 2001 8:25 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Hep DBF I need HELP, I can´t o

RE: [PHP-DB] attach file

2001-09-27 Thread Rick Emery
Follow this link which describes how to create attachments for email: http://www.phpbuilder.com/columns/kartic2807.php3 Use these techniques after retrieving the data from the database to be formed into an attachment -Original Message- From: Sommai Fongnamthip [mailto:[EMAIL PROTECTE

RE: [PHP-DB] Hellllp DBF

2001-09-27 Thread Rick Emery
ECTED]] Sent: Thursday, September 27, 2001 8:39 AM To: Rick Emery; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Hep DBF Who I do ? - Original Message - From: "Rick Emery" <[EMAIL PROTECTED]> To: "'Marcelo Ramos Souza'" <[EMAIL PROTECTED]>; <[EMAIL

RE: [PHP-DB] Hellllp DBF

2001-09-27 Thread Rick Emery
if phpdbase.dll is disabled, then you can't use dbase_open() -Original Message- From: Marcelo Ramos Souza [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 27, 2001 8:55 AM To: Rick Emery; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Hep DBF Using PHP 4 installed and the phpdbas

RE: [PHP-DB] Free PHP/MySQL webhosting

2001-10-02 Thread Rick Emery
start here: http://www.freewebspace.net/ -Original Message- From: Francisco Carvalho [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 02, 2001 11:11 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Free PHP/MySQL webhosting Is there a free web hosting services that support PHP and MySQL? Th

RE: [PHP-DB] Howto make a double LEFT JOIN

2001-10-02 Thread Rick Emery
Remove the parentheses SELECT table1.id FROM table1 LEFT JOIN table2 LEFT JOIN table3 ON table2.id=table3.id ON table1.id=table2.id -Original Message- From: Bas Jobsen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 02, 2001 3:00 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Howto make a

RE: [PHP-DB] Howto make a double LEFT JOIN

2001-10-02 Thread Rick Emery
Remove the parentheses SELECT table1.id FROM table1 LEFT JOIN table2 ON table1.id=table2.id LEFT JOIN table3 ON table2.id=table3.id -Original Message- From: Bas Jobsen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 02, 2001 3:00 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Howto make a

RE: [PHP-DB] Howto make a double LEFT JOIN

2001-10-02 Thread Rick Emery
SELECT table1.id FROM table1 LEFT JOIN table2 ON table1.id=table2.id LEFT JOIN table3 ON table2.id=table3.id -Original Message- From: Bas Jobsen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 02, 2001 3:13 PM To: Rick Emery; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Howto make a double

RE: [PHP-DB] Howto make a double LEFT JOIN

2001-10-02 Thread Rick Emery
please show the REAL output from your query and what it should REALLY look like -Original Message- From: Bas Jobsen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 02, 2001 3:38 PM To: Rick Emery; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Howto make a double LEFT JOIN > SELECT tab

RE: [PHP-DB] mysql - php DATE QUESTION...

2001-10-03 Thread Rick Emery
Check the MySQL manual DATE/TIME functions. try: DELETE FROM mytable WHERE date_column < ( CURRDATE()-30 ) -Original Message- From: Koutsogiannopoulos Karolos [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 03, 2001 7:41 AM To: 'Php-Db (E-mail) Subject: [PHP-DB] mysql - php DATE QUE

RE: [PHP-DB] mysql - php DATE QUESTION...

2001-10-03 Thread Rick Emery
sorry for misspelling: curdate() -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 03, 2001 8:23 AM To: 'Koutsogiannopoulos Karolos' Cc: [EMAIL PROTECTED] Subject: RE: [PHP-DB] mysql - php DATE QUESTION... Check the MySQL manual

[PHP-DB] RE: CGI Urgent

2001-10-03 Thread Rick Emery
I apologize for answering a day late, but I get only the digest version of this list. If you can use PHP instead of PERL, the following article will point you in the right direction. If you cannot use PHP, this article should provide you with the background knowledge you need to send the attachme

RE: [PHP-DB] Check Boxes/UPDATE

2001-10-03 Thread Rick Emery
for( $i=0; $i<3; $i++ ) { if( isset($chkAuthStatus[$i]) ) { do something } } -Original Message- From: Matt C [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 03, 2001 10:17 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Check B

RE: [PHP-DB] Cybercash? or Who?

2001-10-03 Thread Rick Emery
www.cardservice.com -Original Message- From: Raquel Rice [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 03, 2001 1:29 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Cybercash? or Who? On Wed, 3 Oct 2001 09:49:20 -0600 Ricky Theil <[EMAIL PROTECTED]> wrote: > I just recently star

RE: [PHP-DB] PHP Code is Needed

2001-10-18 Thread Rick Emery
Buy a good book on PHP and MySQL. Try ideveloping the application yourself. If you then run into problems, post your question here. -Original Message- From: moi [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 17, 2001 11:54 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP Code is Nee

RE: [PHP-DB] Display results of SUM of an colomn

2001-10-18 Thread Rick Emery
$query = "SELECT sum(my_column) AS total FROM mytable WHERE some_condition"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result); print "Sum of my_column is: ".$row['total']."\n"; -Original Message- From: Mark Weber [mailto:[EMAIL PROTECTED]] Sent: Thurs

RE: [PHP-DB] Newbie: odbc_prepare & parameters

2001-10-18 Thread Rick Emery
What is " fldFlight='?' "? Are you using ? as a wildcard or is it actually the only character in the data field? If you're trying to use a wildcard, then ? is not it. Use % or _ -Original Message- From: Michael J. Eisner [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 18, 2001 11:31

RE: [PHP-DB] Order By for search results ???

2001-10-18 Thread Rick Emery
Maybe I'm slow... I'm trying to decipher what you're trying to do. Show us your table layout Show us your search criteria and code Show us a dump of your table so we can see what the data look like -Original Message- From: Chris Payne [mailto:[EMAIL PROTECTED]] Sent: Thursday, October

RE: [PHP-DB] Re: Newbie: odbc_prepare & parameters

2001-10-18 Thread Rick Emery
Does fldFlight contain the character "?" If it does, you must use: WHERE fldFlight='?' Are you using ? as a wildcard? -Original Message- From: Michael J. Eisner [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 18, 2001 12:53 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: Newbie: odbc_

RE: [PHP-DB] Access to MySQL Conversion question

2001-10-18 Thread Rick Emery
Once it's loaded into MySQL: SELECT ID FROM mytable ORDER BY ID DESC LIMIT 1; This will provide the highest ID index. Set your new ID index in MySQL with the AUTO_INCREMENT attribute. This will automatically increment ID when a new record is added. -Original Message- From: Brad Harrig

RE: [PHP-DB] is mysql is RDBMS

2001-10-18 Thread Rick Emery
Tuuri [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 18, 2001 3:38 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] is mysql is RDBMS Hi! MySQL-3.23.44 -Max and MySQL-4.0.0 support foreign keys through transactional InnoDB type tables. Regards, Heikki http://www.innodb.com Rick Emery wrote

RE: [PHP-DB] Re: Foreign Key in MySQL (was: Newbie Question: Convert SELECT to DEL ETE)

2001-10-18 Thread Rick Emery
://www.innodb.com for more info. Regards, Heikki Innobase Oy Rita Mikusch wrote in message <10C5C8152BD5D31181AC006008AD5F416886AD@NEWCA2>... >Foreign Keys? No such luck! You need to check the for the child records, >then delete them if they exist. > >rita. > >-Original

RE: [PHP-DB] Newbie Question: Convert SELECT to DELETE statement in mysql

2001-10-19 Thread Rick Emery
r defrag on the database that restore wasted space? Thanks, Shaun "Rick Emery" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]... > Are you trying to delete records with a SELECT statement? That can't be > done. > > To delete from two different tables

RE: [PHP-DB] inserting NULL value

2001-10-19 Thread Rick Emery
Null values are displayed as NULL. NULL is NOT the same as "". "" is an empty string. NULL means no value is assigned. -Original Message- From: Adv. Systems Design [mailto:[EMAIL PROTECTED]] Sent: Friday, October 19, 2001 11:15 AM To: PHP List Subject: [PHP-DB] inserting NULL value H

RE: [PHP-DB] Check Boxes!

2001-10-22 Thread Rick Emery
Sometimes, PHP becaomes confused when a variable is included in another word, such as you are doing with $i in: if($HTTP_POST_VARS["chkAuthStatus_$i"] = 'on') To avoid this problem, use braces to segregate the PHP variable from the rest of the word: try: if($HTTP_POST_VARS["chkAuthStatus_${i}"

RE: [PHP-DB] How to write errorhandling??

2001-10-22 Thread Rick Emery
First, that "Failed to Connect" message looks like a database failure to connect message; nothing to do with mail() Second, are you REALLY trying to send header info at line 256? That's pretty far down in a program. Usually, those decsions are made within the first 10 to 20 lines. So, is line 2

RE: [PHP-DB] looped insert

2001-10-22 Thread Rick Emery
Construct your INSERT a piece at a time. Something like: $sql = "INSERT INTO $myanet02 (staffdev,strategies,rules,news,information,policies) VALUES("; for($i=0;$imailto:[EMAIL PROTECTED]] Sent: Monday, October 22, 2001 11:23 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] looped insert Hi everyone

RE: [PHP-DB] Re: PHP and MySQL queries...

2001-10-23 Thread Rick Emery
First o all, GET RID of the 19 constructs using mysql_result(). You've already captured the row with the $row=mysql_fetch_array(). mysql_result() cannot be mixed with mysql_fetch_arry(). So instead of: echo "Address: "; printf(mysql_result($result,$count,"address")); echo "\n"; use: print "Addr

RE: [PHP-DB] Using A Query Results Multiple Times

2001-10-23 Thread Rick Emery
You're on the right track. Did you try?: while( $row[] = mysql_fetch_array($result) ); This should load each result row into a row of a multi-dimensional array. You would then access it with: $row[0]['colname'] -Original Message- From: Adam Douglas [mailto:[EMAIL PROTECTED]] Sent: Tu

RE: [PHP-DB] Re: PHP and MySQL queries...

2001-10-23 Thread Rick Emery
quot;Ogden: ".$row['ogden']."\n"; print "Logan: ".$row['logan']."\n"; print "IP Address: ".$row['ipaddress']."\n"; print "Ad: ".$row['ad']."\n"; print "Total: ".$

RE: [PHP-DB] PHP form to search MySQL DB

2001-10-23 Thread Rick Emery
The error messages have NOTHING to do with the date format. See my previous email to determine how to determine where error is. rick -Original Message- From: Jason [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 23, 2001 4:52 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP form to searc

RE: [PHP-DB] export

2001-10-24 Thread Rick Emery
Do you mean via PHP or directly at the MySQL command line? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 24, 2001 10:12 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] export how can i select records from mysql and store them in a text or spr

RE: [PHP-DB] MySQL Last Modified

2001-10-24 Thread Rick Emery
MySQL command: show table status This command returns multiple fields, including date/time of last update, for each table in the selected database. Call it with mysql_query("show table status") Check the MySQL manual for more information -Original Message- From: Sheridan Saint-Michel [

RE: [PHP-DB] mySQL Query and blank fields

2001-10-25 Thread Rick Emery
REGEXP '..+' -Original Message- From: Niklas Lampén [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 25, 2001 6:17 AM To: Php-DB Subject: [PHP-DB] mySQL Query and blank fields How can I query for specified fields that has to contain atleast 2 charters? Example: Field AAA contains '

RE: [PHP-DB] executing system commands

2001-10-25 Thread Rick Emery
Does your web-host permit you to execute system commands? For system security, most will not. -Original Message- From: Ric Manalac [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 25, 2001 5:46 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] executing system commands hi, i'm a newbiew p

RE: [PHP-DB] mySQL Query and blank fields

2001-10-25 Thread Rick Emery
Change that to: SELECT * FROM foo_table WHERE length(bar_field)>1; -Original Message- From: Tamas Arpad [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 25, 2001 8:01 AM To: Niklas Lampén; Php-DB Subject: Re: [PHP-DB] mySQL Query and blank fields On Thursday 25 October 2001 13:16, Nik

RE: [PHP-DB] mySQL Query and blank fields

2001-10-25 Thread Rick Emery
question: If I want to update several fields, add a number to the end of the fields value, how do I do that? I have field with value '9876' and if I do "...field=field+'5'..." the value turns into '9881' not '98765' as I expected. Niklas

RE: [PHP-DB] mySQL Query and blank fields

2001-10-25 Thread Rick Emery
database. The type of the field is allready varchar. Niklas -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: 25. lokakuuta 2001 16:08 To: Php-DB Subject: RE: [PHP-DB] mySQL Query and blank fields First, I wouldn't use length(), I'd use REGEXP: SELECT * FR

RE: [PHP-DB] import error into mySQL

2001-10-25 Thread Rick Emery
Show your code and table set-up. That would help. -Original Message- From: Dave Pollak [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 25, 2001 1:37 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] import error into mySQL Howdy, New to databases, mySQL, and PHP. In my first PHP/mySQL ap

RE: [PHP-DB] New users on mysql using php

2001-10-25 Thread Rick Emery
Do you have root access to mysql? If so, then you can GRANT privileges to create new users. Otherwise, you have only the GRANT privileges delegated to you by the MySQL admin. -Original Message- From: Harpreet [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 25, 2001 4:03 PM To: [EMAIL

RE: [PHP-DB] date

2001-10-26 Thread Rick Emery
Assume the following table: create mytable ( mydate date ); Assume the following inserts: INSERT INTO mytable VALUES( "2003-02-20"); INSERT INTO mytable VALUES( "2004-12-25"); INSERT INTO mytable VALUES( "1999-01-01"); The following will order this table, assuming precedence of year->month->da

RE: [PHP-DB] date

2001-10-26 Thread Rick Emery
functions in php, they're very nice. mktime(), date(), strftime(), and setlocale() -Steve On Friday, October 26, 2001, at 08:47 AM, Rick Emery wrote: > Assume the following table: > create mytable ( > mydate date ); > > Assume the following inserts: > INSERT INTO myta

RE: [PHP-DB] Mathematics Examples MySQL and PHP

2001-10-29 Thread Rick Emery
What are you trying to do? Your question/example is very unclear. -Original Message- From: Mark Weber [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 28, 2001 3:33 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Mathematics Examples MySQL and PHP Hello Everybody, Does anybody have some ex

RE: [PHP-DB] Resource id #2

2001-10-29 Thread Rick Emery
Change code as follows: ".$row['msg'].""; ?> -Original Message- From: Andrew Duck [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 28, 2001 7:00 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Resource id #2 I am trying to select a message from a table in a database. the message will will

RE: [PHP-DB] HELP PLEASE!! Get query error when inserting into My Sql

2001-10-29 Thread Rick Emery
This also works: INSERT INTO vcstats VALUES( NULL,column2,column3,column4,column5) The NULL value will be replaced with theauto-incremented value in the table -Original Message- From: Ricky Theil [mailto:[EMAIL PROTECTED]] Sent: Monday, October 29, 2001 10:26 AM To: '[EMAIL PROTECTED]'; R

RE: [PHP-DB] TREE in a database

2001-10-29 Thread Rick Emery
Relational databases really are tree structures. However, whereas a tree parent node has pointers to children or sibling nodes; in a relational database, the nodes "point up" to the parent node. The nodes might also maintain a field to identify sibling nodes. -Original Message- From: Ro

RE: [PHP-DB] Fatal error: Call to undefined function: pg_connect() in ...

2001-10-29 Thread Rick Emery
This means that PostgreSQL support was NOT compiled into PHP. Therefore, you cannot use PostgreSQL commands. -Original Message- From: Rodolfo Napoles [mailto:[EMAIL PROTECTED]] Sent: Monday, October 29, 2001 2:17 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Fatal error: Call to undefined f

RE: [PHP-DB] Variables in a loop

2001-10-29 Thread Rick Emery
Lookup "Variable Variables" in the PHP manual. You'll use something like: ${$i} -Original Message- From: LeTortorec, Jean-Louis [mailto:[EMAIL PROTECTED]] Sent: Monday, October 29, 2001 3:04 PM To: '[EMAIL PROTECTED]' Subject: [PHP-DB] Variables in a loop I'm trying to write a loop to

RE: [PHP-DB] HELP PLEASE!! Get query error when inserting into My Sql

2001-10-29 Thread Rick Emery
INTO mystable VALUES(NULL,123,"A text string"); INSERT INTO mystable VALUES(NULL,456,"A text string"); INSERT INTO mystable VALUES(NULL,789,"A text string"); -Original Message- From: Ricky Theil [mailto:[EMAIL PROTECTED]] Sent: Monday, October 29, 2001 3:12 PM

RE: [PHP-DB] get field content

2001-10-29 Thread Rick Emery
$query = "select ColumnName from tableName WHERE rowNumber = $rowNumber,$db"; $result = mysql_query($query); $row = mysql_fetch_array($result); $answer = $row['ColumnName']; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, October 29, 2001 4:07 PM To:

RE: [PHP-DB] automated processes in mysql

2001-10-30 Thread Rick Emery
in Unix, set-up a cron job. In Windows, set-up an AT job. -Original Message- From: Bas Jobsen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 30, 2001 9:36 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] automated processes in mysql Hello, Can i use mysql for automated processes? do $que

RE: [PHP-DB] automated processes in mysql

2001-10-30 Thread Rick Emery
mySQL does not include native support to launch queries at a specific interval. In the mySQL manual, I found the following application: mysqltop.tar.gz: Sends a query in a fixed time interval to the server and shows the resulting table. By Thomas Wana. -Original Message- From: Bas J

RE: [PHP-DB] PHP query on "date" field

2001-10-30 Thread Rick Emery
First, I agree with Bruno concerning putting print all on one line, as you and I discussed previously Jason. Second, keep using DATE data type in mySQL. Simply specify to the user how the date is to be entered on the form. DATE is maintained in mySQL as -MM-DD. User that -Original Mess

RE: [PHP-DB] PHP query on "date" field

2001-10-30 Thread Rick Emery
Jason, date("H") converts to a 24-hour clock. That is, 00 is 12 mid-night, 01 is 1 AM, 13 is 1 PM, 14 is 2 PM, 23 is 11 PM, etc. I do not understand the reasons for your computation that, say 00, is 10 PM. -Original Message- From: Jason [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October

RE: [PHP-DB] PHP query on "date" field

2001-10-30 Thread Rick Emery
Assuming you correct the hours calculation per my previous email, then: $format = ($Hou>12?) "PM" : "AM" ; $Hou -= ($Hou>12?) 12 : 0; And you can do away with all the constructs. -Original Message- From: Rick Emery Sent: Tuesday, October 30, 2001 2:09 PM To:

RE: [PHP-DB] PHP query on "date" field

2001-10-30 Thread Rick Emery
. so instead of the long winded bit of code that was previously setup to change the format of the date for the date field in the db, I should use the 2 lines of code? Definately skeptical on this one... but you know more about this than I. "Rick Emery" <[EMAIL PROTECTED]> wrote in

RE: [PHP-DB] Alternative for Union in MYSQL

2001-10-31 Thread Rick Emery
union available in version 4.0 (alpha) now -Original Message- From: Harpreet [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 31, 2001 11:46 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Alternative for Union in MYSQL I had a view on sqlserver which i am trying to convert to work with m

RE: [PHP-DB] retrieve data from more db

2001-11-01 Thread Rick Emery
Simply indicate the database name in you query: SELECT cust2000.mytable.*, cust2001.mystable.* FROM cust2000.mytable, cust2001.mystable WHERE cust2000.mytable.cust_ID=cust2001.mystable.cust_ID; -Original Message- From: Sommai Fongnamthip [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October

RE: [PHP-DB] sending bulk emails

2001-11-02 Thread Rick Emery
Opswe've just armed a potential spammer... -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 6:20 AM To: Cami Cc: PHP DB list Subject: Re: [PHP-DB] sending bulk emails > Does anybody know how to send bulk emails using php? Don't do

RE: RE: [PHP-DB] sending bulk emails

2001-11-02 Thread Rick Emery
True...so very true... A little knowledge is a dangerous thing. In the hands of a spammer...a deadly thing... -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 7:34 AM To: Rick Emery Cc: PHP DB list Subject: Re: RE: [PHP-DB] sending bulk

RE: [PHP-DB] php-mysql-and the elusive eval statement....

2001-11-02 Thread Rick Emery
That which is in an evel() must be valid PHP code. "?>" is not PHP, rather it terminates a PHP segment. What ARE you trying to execute? I've used eval() with arguments extracted from a mySQL database many times with success. -Original Message- From: Richard A. Noordam [mailto:[EMAIL PR

RE: RE: [PHP-DB] sending bulk emails

2001-11-02 Thread Rick Emery
Actually, I've been tempted to do that. Never done it, though. But I would agree with you. The sense of power would be...euphoric -Original Message- From: Trond Erling Hundal [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 7:36 AM To: [EMAIL PROTECTED]; Rick Emery Cc: P

RE: [PHP-DB] sending bulk emails

2001-11-02 Thread Rick Emery
my comment was humor. we've already explored and killed this thread. -Original Message- From: Robert Klinkenberg [mailto:[EMAIL PROTECTED]] Sent: Friday, November 02, 2001 9:44 AM To: 'Rick Emery'; PHP DB list Subject: RE: [PHP-DB] sending bulk emails Interesting, inst

RE: [PHP-DB] inserting array into mySQL

2001-11-09 Thread Rick Emery
mySQL does not directly support arrays. I'm going to assume that there is a relationship between entries in each array to entries in the other arrays. Therefore, create mysql records which reflect that relationship. Something like: CREATE TABLE people ( name varchar(50) NOT NULL default "", pho

RE: [PHP-DB] inserting array into mySQL

2001-11-09 Thread Rick Emery
Was that line in the movie? If so, wisely said. -Original Message- From: matt stewart [mailto:[EMAIL PROTECTED]] Sent: Friday, November 09, 2001 8:22 AM To: 'Rick Emery'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] inserting array into mySQL >>As we say here in Dallas: the

RE: RE: [PHP-DB] inserting array into mySQL

2001-11-09 Thread Rick Emery
Well we're a little far afield from Manchester. However, in a match between the Dallas Cowboys (American Football team) and Manchester United (Funny Football team), the win goes to the Cowboys. yee...haaa... -Original Message- From: Russ Michell [mailto:[EMAIL PROTECTED]] Sent: Friday, N

RE: [PHP-DB] inserting array into mySQL

2001-11-09 Thread Rick Emery
I could only aspire to that... We better end this thread. We are WAY OFF-TOPIC -Original Message- From: matt stewart [mailto:[EMAIL PROTECTED]] Sent: Friday, November 09, 2001 8:37 AM To: 'Rick Emery'; [EMAIL PROTECTED] Subject: RE: RE: [PHP-DB] inserting array into mySQL

RE: [PHP-DB] JOIN operations

2001-11-12 Thread Rick Emery
> There isn't the field table_name.ID_city!!! because you didn't ask for it. You asked for: table_name.name table_city.ID table_city.city -Original Message- From: Carlo Loiudice [mailto:[EMAIL PROTECTED]] Sent: Friday, November 09, 2001 4:02 PM To: PHP DB Subject: [PHP-DB] JOIN op

RE: [PHP-DB] getting database tables

2001-11-12 Thread Rick Emery
In PHP: $query = "SHOW TABLES"; $result = mysql_query($query) or DIE("Error: ".mysql_error()); while( $row = mysql_fetch_array($result) ) { do some stuff with $row } -Original Message- From: mike luce [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 3:10 AM To: [EMAIL P

RE: [PHP-DB] is it a Many-to-Many relationship ???

2001-11-12 Thread Rick Emery
show us your table structure. which fields do you want to select on in both tables -Original Message- From: Carlo Loiudice [mailto:[EMAIL PROTECTED]] Sent: Monday, November 12, 2001 1:15 PM To: PHP DB Subject: [PHP-DB] is it a Many-to-Many relationship ??? HI again. I'm doing this: I'm

RE: [PHP-DB] Date Calculation

2001-11-13 Thread Rick Emery
Since you mentioned MYSQL, I'm assuming you have some sort of database query in mind. For instance, finding dates in a date field in a table in which 14 days from that field date is significant. For instance, the following locates records whose records contain date fields less than 14 days from t

RE: [PHP-DB] Next

2001-11-14 Thread Rick Emery
Pass the current question number in a parameter to the next page in the URL. In the following, the PHP variable would track your current page: print "Next"; - then, in myform.php3: -Original Message- From: Peter Allum [mailto:[EMAIL PROTECTED]] Sent: Wednes

RE: [PHP-DB] Move next

2001-11-14 Thread Rick Emery
use count() to determine number of elements in the array. Then use the returned result as an index to the last element. Or, do you want to get to the last row of a result set from a mysql query? In which case, go with: $result = mysql_query(...)... $rows = mysql_num_rows($result); mysql_data_see

<    1   2   3   4   >