Re: [PHP-DB] Highlighting search results ???

2001-10-18 Thread DL Neil
$search_term/b, strtolower($matched_string)); // -Original Message- // From: Boget, Chris [mailto:[EMAIL PROTECTED]] // Sent: Thursday, 18 October 2001 2:57 AM // To: 'Chris Payne'; DL Neil; [EMAIL PROTECTED] // Subject: RE: [PHP-DB] Highlighting search results

Re: [PHP-DB] generic function for db setup

2001-10-18 Thread DL Neil
I'm trying to setup a generic function to use to initialize all mysql database access for a site.. Something like function($tablename); How can I do this and preserve the connection outside of that function? ? Hi Dustin, Do you want something like: Making arguments be passed by reference?

Re: [PHP-DB] Question in french about IMG SRC

2001-10-19 Thread DL Neil
? $result2 = mysql_db_query($dbname,select * from gifs); while($colonne2 = mysql_fetch_array($result2)) { switch($colonne[LIV_TYPE_EVT]) { case $colonne2[ID_EVT]; //echo $colonne2[IMG]; echo img src = $colonne2[IMG]; break;

Re: [PHP-DB] PHP and Oracle

2001-10-19 Thread DL Neil
Imbalance of double-quotes on line 43! Thus // comments have all been included in quoted string and hence strange text output. =dn - Original Message - From: GEORGINA ELAINE BAILEY [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 19 October 2001 18:26 Subject: [PHP-DB] PHP and Oracle

Re: [PHP-DB] PHP and Oracle

2001-10-20 Thread DL Neil
Just a cosmetic question really. Why are the three links I have put in at the bottom of the script appearing at the top on the WEb page, just beneath the comp sci banner. How do I get them to appear beneath the table? Georgina, It may look cosmetic but a browser's job is to display mark-up

Re: [PHP-DB] variable operators in queries

2001-10-19 Thread DL Neil
Is it possible to put variable operators in queries? =I can see no reason why not - you're not actually putting the 'variable' in the 'query', just using a PHP-variable to build a PHP-string which will be sent to MySQL as a SQL query... I tried this (the real variable comes from a form)

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

2001-10-22 Thread DL Neil
Luditus/Dobromir, It IS possible to run the mail function on a Win machine - I had a Win2000/IIS(with its own SMTP stub) box running PHP mail happily. Also it is possible to have a Win-with-no-local-SMTP configuration. I have re-jigged my WinNT portable to run the same PHP/Apache script

Re: [PHP-DB] Creating a file using php

2001-10-22 Thread DL Neil
Harpreet, Blunt: Do you ever check the PHP manual before posting? Polite: XXVI. Filesystem functions http://www.php.net/manual/en/ref.filesystem.php =dn - Original Message - From: Harpreet [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 22 October 2001 17:34 Subject: [PHP-DB] Creating

Re: [PHP-DB] Creating a file using php

2001-10-22 Thread DL Neil
Yes it is easier for you. Congratulations! Is it easier for the person answering? Is it easier for the people reading and deleting irrelevant posts? =dn - Original Message - From: Harpreet [EMAIL PROTECTED] To: 'DL Neil' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 22 October 2001 18:27

Re: [PHP-DB] Resource id #2

2001-10-28 Thread DL Neil
I am trying to select a message from a table in a database. the message will will be in column 'msg' and will be in same row as id='0'. I need that msg put to the screen. With the code below I get the error: Resource id #2 Can someone please explain how I can fix this.. Thankyou in advance. ?

Re: [PHP-DB] create table with php -whats wrong?

2001-10-28 Thread DL Neil
Hello all. I am trying to create simple test table with php, but I get: Parse error: parse error in /home/vanesaw/public_html/create.php on line 5 Line 5 is command to create table (see code below). Whats wrong with it? Thanks. ? $sql = mysql_connect(host, login,

Re: [PHP-DB] category structure

2001-10-29 Thread DL Neil
- Original Message - From: olinux [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 29 October 2001 08:16 Subject: [PHP-DB] category structure anyone have any ideas on this I have a table of directory categories id | parentid | category so... 1 | 0 | blah1 top 2 | 1 |

Re: [PHP-DB] background process

2001-10-29 Thread DL Neil
has anyone here created an application using background processes? what i have in mind is to be able to run the background process once a day to check for files that are more than 5 days old and delete them. thanks in advance. ric, PHP (and scripts) can be executed from the command line

Re: [PHP-DB] category structure

2001-10-29 Thread DL Neil
with index of $menu[0][*] one at a time and then print out all $menu indicies where [*] matches $menu[THIS][] the unset removes a category once it's been printed Any ideas? I don't want to recursively hit the database a bunch of times. Thanks, olinux --- DL Neil [EMAIL PROTECTED] wrote

Re: [PHP-DB] background process

2001-10-29 Thread DL Neil
ric, Apologies. Abbreviation m/c means machine. =dn - Original Message - From: Ric Manalac [EMAIL PROTECTED] To: DL Neil [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: 29 October 2001 12:03 Subject: Re: [PHP-DB] background process hi, thanks for the reply. i will look up docs

Re: [PHP-DB] sending bulk emails - mail() success/failure

2001-11-02 Thread DL Neil
Shane, You said: - IMO better this way than a short-timeout script - sending one email can sometimes take ages (long DNS lookup, slow connection to the host, etc...) - The mail() entry in the manual does say that it returns a boolean for send success/failure, however none of the

Re: [PHP-DB] Unwanted Column Updating

2001-11-03 Thread DL Neil
I have this which inserts a stock trade entry: $sql1 = INSERT INTO $table_name (stock, shares, LorS, type, price1, time1) VALUES (\$stock\, \$shares\, \$LorS\, \$type\, \$price1\, NOW()); With price1 being the entry price and time1 the date/time of entry. Then when I exit the trade it

Re: [PHP-DB] EOQ what does it mean??

2001-11-04 Thread DL Neil
Darren, Small confusion in the typing of the original (accurate) submission. It is all one word heredoc and can be found in the manual (using Paul's recommended location) check out http://uk.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc. Think of the

Re: [PHP-DB] Function Prolem parse error

2001-11-04 Thread DL Neil
Paul if your there I have another issue similar to the past. It is probably a PHP3 to PHP4 problem. Here tis function hidden_field ($name=, $value=) * I have no clue what could be wrong. Darren, Check out http://uk.php.net/manual/en/functions.php and from there look up

Re: [PHP-DB] Function Prolem parse error

2001-11-04 Thread DL Neil
Darren, We're not really set up to do line-by-line debugging. You may need to spend a bit (more) time learning PHP to avoid these sorts of frustrations. When the code is executed it gives a parse error on the line containing value=\$value. It would have been helpful to have pointed us at that

Re: [PHP-DB] Not a valid MySQL result resource

2001-11-08 Thread DL Neil
?php //.../... first part of the code is to connect to the right DB on a MySQL server. It works fine //This code to show the query. It runs well under MySQL and gives 1 result : $query=SELECT Login, Password FROM `user` WHERE user.login=''$login'' and user.password=''$password''; //This

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

2001-11-09 Thread DL Neil
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... =an unwise comparison, British football/soccer involves continuous play for two halves of 45 minutes each. American footballers keep

Re: [PHP-DB] or { blah blah blah }

2001-11-09 Thread DL Neil
Inside a function, I am reading data from MySQL. In case any of these calls fail I follow them with something like: or echo Can't make query to database!; The problem is, I want to do more things than just this... and then I want to return out of the function rather than continuing

Re: [PHP-DB] parse-error MySQL - PhP @ win2000

2001-11-10 Thread DL Neil
Hi Jelle, - Original Message - I have recently installed an apache server, PhP4 and MySql on my win2000 machine (I know, I should be running linux; That will have to come with time). But now I am trying to learn PhP - MySQL. When running the script below I get the error message: Parse

Re: [PHP-DB] dlls and inis.Help.

2001-11-15 Thread DL Neil
Anyone got a clue for this piece of bad luck? I'm on win2k pro + IIS5 +php4.0.6 cgi installation. It works fine untill I try to load php_interbase.dll extension and this is how it goes: Unable to load dynamic library '...' - The specified procedure could not be found. Three points stand for:

Re: [PHP-DB] mySQL table update

2001-10-29 Thread DL Neil
I have a large table with quite many dates in format dd.mm. (don't ask why :) and I want to convert them into -mm-dd for obvious reasons. How can I do this the smartest way? I know I could do it with php and update it row by row but that doesn't seem too smart. Can I somehow do a

Re: [PHP-DB] Retrieving rows matched when using UPDATE in PHP/MySQL

2001-11-24 Thread DL Neil
John, How do I retrieve these values using PHP and the MySQL lib? (I'm especially interested in the Rows matched value since the Rows affected function isn't enough to determine why an update resulted in 0 rows changed). It is common practice to check the db BEFORE performing the

Re: [PHP-DB] PHP MySql

2001-11-24 Thread DL Neil
Jonathan, What happens if you take out the comma before the WHERE (as well)? =dn - Original Message - From: Paul DuBois [EMAIL PROTECTED] To: Jonathan Underfoot [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 23 November 2001 17:41 Subject: Re: [PHP-DB] PHP MySql At 4:16 PM -0700

Re: [PHP-DB] Retrieving data woes

2001-12-10 Thread DL Neil
Hi Andres, I have what probably is a basic question, but can't figure out by myself. If any of you kind souls can point me in the right direction I would appreciate it. I have a db table that has these columns: id, date, time, title, body some of the rows can have the same

Re: [PHP-DB] Assistance Urgent.

2001-12-12 Thread DL Neil
Barry, We have a field named: related_discipline which contains 1 of 12 different disciplines. So for example we have Rail which could be in the field, or Utilities and so on.. what we need to do is know how many of each there are in the database, I am still developing my knowledge of PHP and

[PHP-DB] Re: [PHP] how to create html tables in php

2001-12-29 Thread DL Neil
Hi Sander, I made a database with bookmarks, these bookmarks are catogarized by type. Now I want to display those bookmarks in tables by category. This works already fine. The only problem I have is that the tables are very difficult to handle. I want to make 4 tables in a row (so that

Re: [PHP-DB] mysql_num_rows

2002-01-06 Thread DL Neil
Gurhan, The first rule with all of these problems is to insert error-checking statements. There are two types: firstly the MySQL function set includes error number and error (msg) text facilities; and secondly the addition of 'debug' echo statements, eg to be absolutely sure what $query looks

Re: [PHP-DB] ABC listings

2002-01-07 Thread DL Neil
I would like to set up one of those A B C D E F page listings. How do i query the database to grab the first letter from each entrey. Barry try something such as select info from mytab where name like $ltr%; Barry, What you have asked for (from each entrey [sic]) is: SELECT LEFT(

Re: [PHP-DB] Concept help required

2002-01-07 Thread DL Neil
George, In trying to learn PHP (and MySQL), I am attempting to replicate a database-web solution built previously using Filemaker Pro and Lasso (on NT). I am currently working with PHP/MySQL on NT and will be moving this to Linux before the end of January. =As a general comment, it is

Re: [PHP-DB] Concept help required

2002-01-08 Thread DL Neil
George, =As a general comment, it is always dangerous to replicate when shifting platforms, better to reverse engineer and then implement anew and taking advantages of the strengths of the new tools. This particularly when moving into the relational field... Perhaps the use of the word

Re: [PHP-DB] Concept help required

2002-01-08 Thread DL Neil
George, DL Neil (I presume you have a first name tucked away inside there), =David Your comments are appreciated. I am becoming more and more comfortable with what I am doing with MySQL/PHP. =I have found it to be an excellent combination (even on Windows) and have used them as the means

Re: [PHP-DB] count query

2002-01-08 Thread DL Neil
Barry, Is it posible to do a count(*) on a tabe where id=2 and count just those that id = 2 =why don't you try it? The answer is yes, because count(*) means count the entire number of non-null rows selected. See manual: 3.3.4.8 Counting Rows =dn -- PHP Database Mailing List

Re: [PHP-DB] Concept help required

2002-01-09 Thread DL Neil
George, =I was pleased to hear from Miles. There are likely to be as many suggestions for how things should be done, as there are developers. I'll be interested to hear from others - personally (cf on the list) if the comments might 'interfere'/argue a case (and thus risk muddying your waters)

Re: [PHP-DB] Updating table with data from another table in the same database

2002-01-09 Thread DL Neil
Markus, I have the daunting task of porting an Access database to MySQL. It's unbeliveably poorly designed, and columns id, name, issn, year, info, volume, numbers and remarks. I made another table, names, that's got columns id and name. I used INSERT INTO names (name) SELECT DISTINCT

Re: [PHP-DB] Re: [PHP] need help looping through each record with a query -stumped

2002-01-10 Thread DL Neil
Brian, first off, Martin your suggestion looks great but I don't think its SQL syntax is supported by MySQL. It's a good start though - gives me something to work with :) =until it is tried, you won't know! From an SQL point of view it looks ok. In fairness to Martin, from the 'further

Re: [PHP-DB] Concept help required

2002-01-10 Thread DL Neil
You wouldn't happen to have a spare ELH diagram (or two) lying around that one could take a look at, would you? Hah TIM now you've got me! I 'do' diagrams. I don't 'do' neat! [no need to move over Matisse] The longer answer is that I have diagrams coming out of my ears (well, computer), but

Re: [PHP-DB] Concept help required

2002-01-10 Thread DL Neil
Olinux, Haven't been following and not sure if this is what you're after, but these are some great data models: http://www.databaseanswers.com/data_models/index.htm Thanks for this. I came across this site/these diagrams before, but thought them to be too 'introductory' and vague for use

Re: [PHP-DB] Concept help required

2002-01-10 Thread DL Neil
Hi George, =I'm feeling a little 'at sea' here, because we had established that you want to learn more about joining, yet you recognise the word normalisation straight off... Feel free to realign my approach... No need to feel at sea. After an earlier response from either you or Miles, I

Re: [PHP-DB] Concept help required

2002-01-10 Thread DL Neil
=ex-Navy guys are always at sea - however they never let me near the ships, but I guess that's another story... ex RAF myself (almost 30 years ago though), so I suppose I might be all 'up in the air'? =there's a bunch of fast-mover jockies and helo boys who never have to pay for their

Re: [PHP-DB] Concept help required

2002-01-10 Thread DL Neil
Hi Rick, many people have a very shallow understanding of SQL - particularly [he says generalising like crazy] people who 'fall into it' from (say) PHP programming... This shallow understanding means that 'they' will tend to do too much in PHP (assuming they know it better) in preference

Re: [PHP-DB] GROUP BY MONTH(DateBilled) misses an entry consistently

2002-01-11 Thread DL Neil
Mike, Have you posted all of the relevant code - for example, how the 'result' is limited to three month's worth of data??? Have you extracted the SQL from the PHP and applied it directly to the command line or used it in a MySQL Management package? Was the result any different? Please advise,

Re: [PHP-DB] mail() - Return-Path

2002-01-12 Thread DL Neil
Malcolm, I Have been trying to change the Return-Path: when using mail() but to no success. I have followed the examples in the documentation. Is there any hidden trick - Iam using apache 1.3.14, php 4.1.1 and sendmail 8.9.3. =There's been some grouching on the lists about spam and vague

Re: [PHP-DB] Sorting the output (opendir() and readdir())

2002-01-12 Thread DL Neil
Christian, we have a directory with pics, that a user can associate with his data in a form. we use opendir/readdir to show the directory contents. unfortunately, this is not sorted. How can we achieve a listing in alphabetical order? this is our code: echo select name='image'; echo

Re: [PHP-DB] GROUP BY MONTH(DateBilled) misses an entry consistently

2002-01-12 Thread DL Neil
topical/self-documenting] =Thus there is no need for the 'double' resultset extractions... =Regards, =dn - Original Message - From: Mike Gifford [EMAIL PROTECTED] To: Mike Gifford [EMAIL PROTECTED] Cc: DL Neil [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 11 January 2002 20:21 Subject: Re: [PHP

Re: [PHP-DB] mail() - Return-Path

2002-01-12 Thread DL Neil
Malcolm, Thank you for all this info. Let's take it one step at a time:- 1. Message sends. =yes, answers 1 and 4 highlight the problem with email (not just email from PHP!) - there are no guarantees... (except that the developer will suffer severe headaches and recurring nightmares) 2/3.

Re: [PHP-DB] properly a simple question

2002-01-13 Thread DL Neil
Barry, This is properly a simple question but I can't figure it out. =please don't ask im-proper questions, this is a family environment!!! Lets say I've got there tables: table1(art_id,artist), table2(song_id,art_id,song), table3(image_id,art_id,image). What I'm trying to do is get 1 image

Re: [PHP-DB] Re: [PHP] convert yyyy/mm/dd to mm/dd/yyyy, how?

2002-01-13 Thread DL Neil
Rasmus, I have held several datetime-related conversations with people recently, and another series about 'when'/whether to use PHP or MySQL functionality. Here you are, the man of PHP, advising Sander to use MySQL functionality! (and in marked contrast to the (biased) advice one might expect

Re: [PHP-DB] The New Guy

2002-01-14 Thread DL Neil
Christopher, I do a lot of work with Perl and have decided to see what this PHP is all about. The best way for me to do that, is to just do a project. Here is what I am looking to do. I would like to use PHP and the SQL language on a CSV or Flat File Database. A lot of my work is on unix

Re: [PHP-DB] RE: LIMIT and get_num_rows

2002-01-14 Thread DL Neil
Have you (original post-er) tested performing a SELECT ... LIMIT 0, 20 and then calling mysql_num_rows()? Does it return 20 (the LIMIT) or the number of rows SELECT-ed before/without regard to the limit? =dn - Original Message - From: matt stewart [EMAIL PROTECTED] To: [EMAIL

Re: [PHP-DB] The New Guy

2002-01-14 Thread DL Neil
In another thread there's a comment about newbie bashing, the author now gets to see that there are always two sides to a story! Christopher: I notice that you have found it necessary to explain your rationale for They do not want to pay the extra amount of money for a MySQL database. The fact

Re: [PHP-DB] How can recommend a book for SQL and DB design

2002-01-15 Thread DL Neil
Andy (and Natalie), In fact the O'Reilly book on PHP is the exception that might well prove the rule - normally I think them v.good The reference work on MySQL is by Paul DuBois (who often stops by here - hi Paul) and published by New Riders. Unfortunately none of my favorite texts (of the

[PHP-DB] Re: [PHP] mysql_insert_id?

2002-01-15 Thread DL Neil
Hi Wee, Is it possible that I would get the wrong ID (Not the ID I just inserted in Auto_Increment field) by using mysql_insert_id function if someone is also inserting record at the same time? How does mysql_insert_id work accurately? =A couple of things here: 1 if the field is defined as

[PHP-DB] Re: [PHP] mysql_insert_id?

2002-01-15 Thread DL Neil
Hi Wee, Is it possible that I would get the wrong ID (Not the ID I just inserted in Auto_Increment field) by using mysql_insert_id function if someone is also inserting record at the same time? How does mysql_insert_id work accurately? =A couple of things here: 1 if the field is defined as

Re: [PHP-DB] Logicproblem in WHERE statement

2002-01-16 Thread DL Neil
=An alternative approach:- I am building a user search engine. Now I do not know how to gett following: a mandatory field and a voluntary field For example I would like to get all female users and those who are from canada. The results should show all users who are female

Re: [PHP-DB] sorting on the first 8 digits....

2002-01-16 Thread DL Neil
John, Ok, I did something stupid and now I am paying the price... =boy am I glad that I'm not the only one in the world! How come the 'people' who extract these prices don't accept Mastercard? In an internal database that tracks the time and date something happens on our site, I

Re: [PHP-DB] Re: [PHP] mysql_insert_id?

2002-01-16 Thread DL Neil
Hi Martin, 2 because the (function argument) controlling feature is the connection, it is not possible for another concurrent user to 'steal' your ID or influence the ID returned to you - it's all yours! Ok, assume you are correct, but what if you are using persistent connections (ie

[PHP-DB] Re: [PHP] mysql_insert_id?

2002-01-16 Thread DL Neil
Hi Jimmy, 2 because the (function argument) controlling feature is the connection, it is not possible for another concurrent user to 'steal' your ID or influence the ID returned to you - it's all Ok, assume you are correct, but what if you are using persistent connections (ie

[PHP-DB] Re: [PHP] mysql_insert_id?

2002-01-16 Thread DL Neil
Hi Jimmy, the only problem i can think of might occur with pconnect is, last_insert_id() will return you the last inserted ID from previous 'session', not current 'session'. to prevent this, you should call last_insert_id() only when your INSERT query executed succesfully. =Of course

[PHP-DB] Re: [PHP] mysql_insert_id?

2002-01-16 Thread DL Neil
Jimmy, However it is also possible that in order to save time the LAST_ID information is built into the resultset coming back from the INSERT - thus when mysql_insert_id() is called PHP would not need to go back to MySQL/last_insert_id(). yes, what you said could be true also. Well,

Re: [PHP-DB] Querying MySQL using PHP - modify existing query

2002-01-17 Thread DL Neil
Andrea, I am a serious newbie (like less than two weeks never programmed before), so I hope my code doesn't suck too bad this isn't a really bad question... but here goes... I would like to modify this query so that it doesn't return the username, realname, and office results each time.

Re: [PHP-DB] php/msql

2002-01-19 Thread DL Neil
Hi Mike while ($row = mysql_fetch_array($result)) { echo trtd.$row[0]./td\n; echo td.$row[1]./td\n; $formatted=sprintf($%s,$row[2]); echo td $formatted /td/trbr; } I get an error in the last line where I want to put $formatted into the last cell of a table if I // echo $formatted

Fw: [PHP-DB] RE: LIMIT and get_num_rows

2002-01-20 Thread DL Neil
have returned without a LIMIT clause. FYI/Coming soon/watch this space! Regards, =dn - Original Message - From: DL Neil [EMAIL PROTECTED] To: matt stewart [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: 14 January 2002 14:17 Subject: Re: [PHP-DB] RE: LIMIT and get_num_rows Have you

Re: [PHP-DB] theme header query

2002-01-21 Thread DL Neil
Tables should be opened and closed - and (please) code should be readable! =dn - Original Message - From: Barry Rumsey To: [EMAIL PROTECTED] Sent: 21 January 2002 17:54 Subject: [PHP-DB] theme header query I'm trying toadd thefollowing codeto atheme: .td

Re: [PHP-DB] theme header query

2002-01-21 Thread DL Neil
--- From: DL Neil Date: Tuesday, 22 January 2002 8:09:02 a. To: Barry Rumsey; Subject: Re: [PHP-DB] theme header query Tables should be opened and closed - and (please) code should be readable! =dn - Original Message - From: Barry Rumsey To: [EMAIL PROTECTED] Sent: 21 January 2002 17:54 Subject

Re: [PHP-DB] Looping advice sought

2002-01-22 Thread DL Neil
George, I am about to start on a script page which will loop thru a MySQL table and update records depending on the actions of the user. I propose to loop through, row by row performing a separate UPDATE statement for each row, unless someone can advise me of a better way (2d array?). It

Re: [PHP-DB] Re: Looping advice sought

2002-01-22 Thread DL Neil
George, Please check out 6.4.5 UPDATE Syntax! Rather than a complex series of partly nested IF statements, can you rationalise the structure to a SWITCH-CASE? - and with neater (than email) formatting improve readability/comprehension as well? $i=1; while $i($howmany + 1) {

Re: [PHP-DB] # of Records in Table

2002-01-23 Thread DL Neil
Zach, What syntax can I use to determine how many records are in a MySQL table and then retrieve the value of the field password for the last record? I tried using some combinations of COUNT(*) and LIMIT with no success. SELECT COUNT(*) will answer the first part. What did you try that

Re: [PHP-DB] # of Records in Table

2002-01-23 Thread DL Neil
Zach, How can this last record be identified? Is there a key field or something similar? Again: We might need to see the table definition to answer this. Please advise, =dn - Original Message - From: Zach Curtis [EMAIL PROTECTED] To: DL Neil [EMAIL PROTECTED] Sent: 23 January 2002

Re: [PHP-DB] # of Records in Table

2002-01-23 Thread DL Neil
is going to give their (free) time to help you out. (grumble) =dn - Original Message - From: Zach Curtis [EMAIL PROTECTED] To: DL Neil [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: 23 January 2002 21:52 Subject: RE: [PHP-DB] # of Records in Table The key field is the password field, which

Re: [PHP-DB] problem with LOAD DATA INFILE for date format

2002-01-25 Thread DL Neil
Hi Hendra An alternative would be to:- 1 LOAD DATA the table, but format each date field as a string. 2 add a date column 3 use UPDATE to convert/re-format the data from the string to date field 4 remove the string column This solution does not require you to tackle another tool and face the

Re: [PHP-DB] counting with CURDATE() - please help!

2002-01-26 Thread DL Neil
Hello Sander, I want to add a variable numer of months to the current date CURDATE(). I thought it should be something like this: select (MONTH(CURRENT_DATE)+MONTH(2)) but i get NULL as a result. The purpose of this it to check which records with a experation date is earlier or later

Re: [PHP-DB] UPDATE query to add to a field

2002-01-28 Thread DL Neil
Hello Adv. Systems Design, I need to be able to update a field in MySQL, the catch is that I have to add on to text that is already there and I have to be able to do it within MySQL (phpMyAdmin). My first idea was to do: SET prod_desc = prod_desc + more info to tack on to end but this is a

Re: [PHP-DB] Date operations.

2002-01-29 Thread DL Neil
Wow Garry, I know that I like to kick-start my brain by getting 'into' a list problem/challenge in the (London) mornings, but today I'm completely beaten. Thanks for the broad explanation, which is probably quite meaningful, but I'm not into breeding (could that statement be misunderstood?)

Re: [PHP-DB] RE: ensuring unique field value in MySQL using PHP

2002-01-29 Thread DL Neil
Janet, MySQL (and indeed all multi-user databases) has a feature called Locking. What this means is that whilst many users/clients may access a database, apparently simultaneously, when one (or more) is updating the data in some way, everyone else is kept locked-out for the duration. Hopefully

Re: [PHP-DB] how to reverse a hudge multidimensional array?

2002-01-30 Thread DL Neil
Etienne, Well i hope someone will be able to give me a solution... Here s my problem: I'm working with a hudge mysql table (about 15 columns and 100 rows...) in fact i ve got to count the number of couples `ncompte`/`naffaire` in the table and finaly calculate the number of couples

Re: [PHP-DB] Date operations.

2002-01-30 Thread DL Neil
Garry, CREATE TABLE breeding ( rec SMALLINT(4) UNSIGNED AUTO_INCREMENT, sire SMALLINT(4) UNSIGNED, dam SMALLINT(4) UNSIGNED, paired DATE, split DATE, num_offspring TINYINT(1) ZEROFILL, PRIMARY KEY (rec) ); First, we define if a pair was breeding for

Re: [PHP-DB] how to reverse a hudge multidimensional array?

2002-01-30 Thread DL Neil
- Original Message - From: DL Neil [EMAIL PROTECTED] To: Etienne Durand [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, January 31, 2002 10:44 AM Subject: Re: [PHP-DB] how to reverse a hudge multidimensional array? Etienne, Well i hope someone will be able to give

Re: [PHP-DB] Re: Date operations.

2002-01-31 Thread DL Neil
Frank, As yet no response from Garry, but I wanted to ask: You already have DateTable set up (presumably), so extending its application into a relationship with the breeding table is no big deal. Given that one suggestion was that Garry could consider storing monthly statistics in another

Re: [PHP-DB] how to reverse a hudge multidimensional array?

2002-01-31 Thread DL Neil
of distinct naffaire values? How many different frequencies result? ie How many records/array elements do you have returned at each step? Hope i managed to be clear. =see comment above. =Regards, =dn Thanx for your help Etienne - Original Message - From: DL Neil [EMAIL PROTECTED

Re: [PHP-DB] Ensuring users don't overwrite each other (NOT a newbie question)

2002-02-01 Thread DL Neil
Ollie, Probably easier to repeat the 'read' (from the first population of the user form) - and then do the comparison(s) in PHP - either way it will a SQL query that must be evaluated by PHP before the UPDATE is issued. ie put the interaction in a function and call it from the two locations

Re: [PHP-DB] Ensuring users don't overwrite each other (NOT a newbie question)

2002-02-01 Thread DL Neil
time the user would be aware that what (s)he thinks of a transaction is not the same as the RDBMS' view! =dn Or not? Ollie -Original Message- From: DL Neil [mailto:[EMAIL PROTECTED]] Sent: 02 February 2002 15:40 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; Php-Db ML Subject: Re

Re: [PHP-DB] Ensuring users don't overwrite each other (NOT a newbiequestion)

2002-02-02 Thread DL Neil
This is good brain-storming guys! Better to use an integer rather than a date field as 2 simultaneous transactions can still occur on the same second; most date time fields are accurate only to the nearest second. Good point, John. However MySQL (AFAIK) does not have any time functions

Re: [PHP-DB] Re: php-db Digest 1 Feb 2002 07:48:33 -0000 Issue 1027

2002-02-02 Thread DL Neil
Frank, As yet no response from Garry, but I wanted to ask: You already have DateTable set up (presumably), so extending its application into a relationship with the breeding table is no big deal. Given that one suggestion was that Garry could consider storing monthly statistics in

Re: [PHP-DB] query from two tables

2002-02-04 Thread DL Neil
Hi Balazs, The situation: I have 2 tables in an adverising site. In one table, i have the cities used by advertisers, and in the other there are the ads.This ad table has a field which refers to the id of the city in that table. The problem: what mysql method should i use if i want to

Re: [PHP-DB] Update

2002-02-04 Thread DL Neil
Hi Jennifer, I am having problems with this code. I want to update a members number of days they have been a member can anyone help? $query[days]=(UPDATE users set days_member VALUES = ('days_member' + '1')); $result=mysql_query($query[days]); =1 RTFM 6.4.5 UPDATE Syntax =2 Why would

Re: [PHP-DB] Username

2002-02-05 Thread DL Neil
Jennifer, You have a clear idea of what you want done by the script - as guided by the book. However, do you have a clear idea of what the script is actually seeing - and therefore why it is doing what it's doing? When debugging, add a heap of ECHO statements to test pertinent values, eg

Re: [PHP-DB] query error...

2002-02-05 Thread DL Neil
Ok jas Ok what is wrong with this sql statement? $sql = UPDATE $table_name SET c_name=\$c_name\,s_addy=\$s_addy\,city=\$city\,state=\state\zip=\zi p\,phone=\$phone\; insufficient checking: comma missing between state and zip incorrectly escaped before phone ... I have looked on MySQL.com

Re: [PHP-DB] Is this possible?

2002-02-06 Thread DL Neil
Hi Raymond, I have this tricky case, at lest for me : ) I'm trying to get some data out of two tables and listing the data in a product/price site. But. : I have one table with productinfo and one with prices. And it is several columns with the same id in the pricetable, because every

Re: [PHP-DB] Is this possible?

2002-02-06 Thread DL Neil
Raymond, See complaint elsewhere as a result of cross-posting. Add my criticism because I'm on both lists and keep them in separate InBox folders and now feeling schizoid... SELECT * [whatever] FROM pristabell P, varetabell V1, varetabell V2 WHERE P.varenr = V1.varenr AND P.varenr = V2.varenr

Re: [PHP-DB] Simple Question, hopefully simple answer

2002-02-08 Thread DL Neil
Luke, In one of my mySql tables I have a colum that contains many fields of numbers. for example | id | Name | Age | Sex | |1 | Jim | 17 | m| |2 | Dave | 31 | f | |3 | Fred | 25 | m| Ok and I want to

Re: [PHP-DB] MySQL / PHP Database Help

2002-02-08 Thread DL Neil
Jonathan, I'm trying to write a script that checks for multiple entries on a table in a database. So far I've been plagued by MySQL errors. I'm fairly confident my scripting is ok (Then again, I've been wrong before.) I think moreover there might be some difficulty with my theory. Then

Re: [PHP-DB] Simple Question, hopefully simple answer

2002-02-08 Thread DL Neil
RTFM (MySQL) for COUNT() and SUM() (and many other useful functions). My MySQL client is giving me a syntax error when I enter that command. :-) =that? Please post the SQL/PHP causing the problem - the list's crystal ball filter is not working. =dn -- PHP Database Mailing List

Re: [PHP-DB] MySQL / PHP Database Help

2002-02-08 Thread DL Neil
Jonathan, [have put the cc back to the list] Is it possible to make BOTH the date and venue into a single unique index? =Why not? Like a good woman, treat her right, and SQL will do almost anything for you: 6.5.3 CREATE TABLE Syntax CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name

Re: [PHP-DB] Re: Searching Documents

2002-02-08 Thread DL Neil
Todd, No one knows??? =or isn't telling? hmm... I looked around on php.net couldn't find anything regarding this.. would I need to do these searches in MS Word docs with ASP? =go ahead if you are aspidexterous... =the Word document format is proprietary information - ie not 'open'. So it

Re: [PHP-DB] Re: Searching Documents

2002-02-08 Thread DL Neil
Court, Todd, et al Actually, PHP does COM very wellsearch the PHP-WIN list about COM and Word and you should find some good hints and examples to get going. I haven't accessed the keywords portion of a word document yet, but someone wrote a spellcheck function that used the spellcheck

  1   2   >