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 connecti

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] Cre

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'

Re: [PHP-DB] HELP PLEASE!! Get query error when inserting into MySql

2001-10-27 Thread DL Neil
> I have a query whenever I try to insert something into a mysql table. This is > the code I am using: > > $host1 = gethostbyaddr("$REMOTE_ADDR"); > $date = date("Y-m-d h:i:s"); > $link = mysql_connect("$host", "$user", "$passwd"); > mysql_select_db("$database", $link); > $sql = "INSERT INTO vcst

Re: [PHP-DB] PHP

2001-10-27 Thread DL Neil
Bring the table processing 'loop' into line with the recordset processing 'loop'. =dn - Original Message - From: "GEORGINA ELAINE BAILEY" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: 27 October 2001 15:28 Subject: [PHP-DB] PHP > Ok, I have a HTML form, where I can select a module

Re: [PHP-DB] HELP PLEASE!! Get query error when inserting into MySql

2001-10-28 Thread DL Neil
Joshua, Thanks for this. The original question wasn't mine, but I'm sure Robby will be interested to read it... =dn - Original Message - From: "Joshua Long" <[EMAIL PROTECTED]> To: "DL Neil" <[EMAIL PROTECTED]> Sent: 28 October 2001 07:10 Sub

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

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", "

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 >

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 li

Re: [PHP-DB] category structure

2001-10-29 Thread DL Neil
i need is the ability to go thru all of > the menu array 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 recursiv

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] b

Re: [PHP-DB] automated processes in mysql

2001-10-30 Thread DL Neil
> Can i use mysql for automated processes? > do $query every hour. Bas, Sure, set up the PHP script to run from the command line, then kick that off using a CRON job or Windows' AT command (according to your preference). =dn -- PHP Database Mailing List (http://www.php.net/) To unsubscrib

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 ex

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 ex

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 << To:

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 lo

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 t

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

2001-11-08 Thread DL Neil
> //.../... 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 ke

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 con

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 st

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 p

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

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 th

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 an

[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

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 li

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:

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 i

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

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 the

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 (http://www

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 DIST

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 in

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

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 t

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 prefere

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 ""; > echo "please select

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

2002-01-12 Thread DL Neil
calling routines is much more 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: "

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 dis

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 expec

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] ADDING DATES

2002-01-14 Thread DL Neil
Hear, hear! =dn > Yep, maybe it is, but when a post starts with " ... but i am getting lazy", > I get a bit peeved. The implication is "Do my work for me." > > It's different when the context is I want to do this ... tried this ... > results aren't right ... please help. > > Miles > > At 0

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 PRO

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 f

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

[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

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

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 mistak

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

[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

[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

[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

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

Re: [PHP-DB] php/msql

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

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 2

Re: [PHP-DB] MySQL Update help needed

2002-01-21 Thread DL Neil
Hi Chris, Can anyone see what is wrong with this query? I am trying to update some fields, if I do an echo everything looks good but it doesn't update the fields in the DB - am I missing something obvious here? $mysql_query ("UPDATE search6 SET email = '$email',description = '$comments',categ

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: ."\n"

Re: [PHP-DB] theme header query

2002-01-21 Thread DL Neil
ssage--- 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 Su

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?

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) > { > $activi

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] Resource Id #2

2002-01-23 Thread DL Neil
Dan, > Good, I'm glad it worked!!! > > I see a lot of people using mysql_fetch_array(). > > Which is fine...But I'm more into Object Oriented programming...and > that's why I always use mysql_fetch_object() hey this is a family show - but I guess 'what you do in the privacy of' ...

Re: [PHP-DB] Books and what nots

2002-01-23 Thread DL Neil
got a credit card, used to ,but it got me into a lot of trouble. No I'll head down to tech books in a couple of of hours when they open. -------Original Message--- From: DL Neil Date: Thursday, 24 January 2002 7:23:17 a. To: Barry Rumsey Cc: [

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 Nei

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

2002-01-23 Thread DL Neil
ly) parsimonious in the provision of information, if you expect/hope that someone 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: <[EMA

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

2002-01-24 Thread DL Neil
om: "Zach Curtis" <[EMAIL PROTECTED]> To: "DL Neil" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: 24 January 2002 00:01 Subject: RE: [PHP-DB] # of Records in Table > There are many columns of data in the table. The only column that I would > like to extract

Re: [PHP-DB] Return 1 instance of each unique record?

2002-12-06 Thread DL Neil
Hi Doug, > How do I get MySQL to summarize a query so that I receive only 1 instance > per similar record. I.E. if you have 10 records with name "Smith" and 5 > records with "Barney, etc, that it would return 2 records instead of 15. Try the MySQL DISTINCT feature. =dn -- PHP Database Mailin

Re: [PHP-DB] The "noobest" of questions...

2002-12-08 Thread DL Neil
Brett, Works for me! Show your code, =dn > How do you load a standard web page from PHP. > > I thought, from what I read, that is was with fopen() ... but its not > working for me. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Apache, PHP and MySQL

2002-12-08 Thread DL Neil
Alex, > I am trying to set up a test server to test updates before changing my > uploaded pages. I have running Windows 98. I have Apache installed and > running, and thought I have PHP installed properly. (Installed it as Welling > and Thomson). However when I try to run my test.php file which sh

Re: [PHP-DB] Apache, PHP and MySQL

2002-12-09 Thread DL Neil
telescope, it sounds more like a conf issue for PHP than anything else (calling for refinement not brute force!) > I am running Apache 1.3.24 for Win32 =a good vintage, if not the latest nouveau. =if you follow W&T's instructions and it still fails, come back with the relevant snipp

Re: [PHP-DB] Help please

2002-12-10 Thread DL Neil
SpiderWebb, One posting to one list is enough... > I dont know if this is possible in PHP (Newbie) im working on a project > where each product has 3 diffierent prices depending on the amount sold so > say for example 1- 100 price A 101-299 price B and above 300 Price C. What > I need to be able t

Re: [PHP-DB] The "noobest" of questions...

2002-12-10 Thread DL Neil
Hi Brett, [please keep conversations on the list - someone else might have helped you more promptly - others might benefit from following the conversation] > This is how I have the code written: > if ($num_results > 0){ > fopen("http://www.vcathletics.org/Misc/AdminMenu.htm","r";); > } > I

Re: [PHP-DB] More Apache Installation problems

2002-12-10 Thread DL Neil
Alex, Congrats at getting Apache off the ground. Lots of advice here about hardware, but... Are both your WS and Svr Windows boxes? If so, which OpSys? If you want both to share access to the Internet, consider "modem sharing" or "ICS" (Internet Connection Service - IIRC - M$ not v.generous on adv

Re: [PHP-DB] Update Query Help...

2002-12-10 Thread DL Neil
SCOTT, > I am attempting to UPDATE a table and I have having absolutely ZERO > success. Here is the query: > $tmp = $_POST['sbcuid']."-".$_POST['system'][$a]; > $update = "UPDATE accounts SET atime='NOW()' WHERE > \"id-sys\"='".$tmp."'"; > echo $update; > $result1 = mysql_query($update, $Prod) or

Re: [PHP-DB] Update Query Help...

2002-12-10 Thread DL Neil
SCOTT, The list's crystal ball filter is down for maintenance. Show us the tbl schema and the debug print of $update. Then we won't be firing blind! =dn > I understand that the column name does not normally need quotes, but > without quotes on the column name I get a mysql error message about no

Re: [PHP-DB] Formatting txt from a database

2002-12-12 Thread DL Neil
Lisi, To save reinventing the wheel would strip_tags() be any use to you? (see manual) =dn > I am retrieving text stored in a database, and I want to strip out any HTML > tags and then only display the first 30 characters with "..." to show the > user that there is more text to view. > > My probl

Re: [PHP-DB] php/mysql problem

2002-12-14 Thread DL Neil
Hi Stefan, > i've a problem with php and mysql. > a mysql-server is running on my server on that i can access from 'outside'. > but, if i want to connect to the server with a 'local' php skript (running > on the same server), mysql refuses the login ('acces denied for user > [...]'). the problem i

Re: [PHP-DB] Help with connecting PHP/MySQL to MS Outlook

2002-12-19 Thread DL Neil
Chris, > Does anyone know of a way to retrieve MS Outlook data via PHP? I am creating > an intrant for my company and want to grab data from the MS Oulook contact > list on the server to using in my PHP/MySQL intranet project. > > Any help would be most appreciated. Rather than using PHP to go '

<    1   2