RE: [PHP-DB] Parse error on array and SQL query

2003-11-20 Thread Hutchins, Richard
Speaking for myself only, I'm probably going to need to see more code than this to be able to help. These two lines appear to be OK. The error might be in what feeds line 187. > -Original Message- > From: Dillon, John [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 20, 2003 9:16 AM >

RE: [PHP-DB] Parse error on array and SQL query

2003-11-20 Thread Hutchins, Richard
If you're not getting the parse error anymore, I'd suggest you echo $query to the browser and check to see that the SQL statement is what you expect it to be. Can't count the number of times doing that has pointed out some stray apostrophe or comma or something that killed the query. > -Origin

RE: [PHP-DB] user input killing code

2003-12-02 Thread Hutchins, Richard
addslashes($userInput) Rich > -Original Message- > From: redhat [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 02, 2003 10:49 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] user input killing code > > > I am still working on this DB entry page. I have a sort of > content mgt > pa

RE: [PHP-DB] Redirect.

2003-12-02 Thread Hutchins, Richard
Don't know if I fully understand your question, but, in general, you can handle redirects with the header() function, e.g., header("Location: http://www.yoursite.com/yourscript.php?msg=0&storyID=".$newstory."";); As you can see, you can include variable=value pairs at the end of the URL as well

[PHP-DB] Annoying Server Responses

2003-12-02 Thread Hutchins, Richard
Sorry to bother all of you with this, but are any of you still getting either of these responses each time you post to this list? Il nuovo indirizzo è: [EMAIL PROTECTED] La mail è stata comunque inoltrata entro 60 minuti al nuovo indirizzo di posta. Si consiglia sin da subito l'utilizzo del nuovo

RE: [PHP-DB] Need help replacing one record

2004-01-09 Thread Hutchins, Richard
If I understand your question correctly, an UPDATE query should be all you need. UPDATE tablename SET columname='value' WHERE someid='somenum'; I'm assuming you don't have the MySQL doc. Check mysql.com for the docs for your version of the server. Rich Hutchins, CIW Professional Sr. Technical Wr

RE: [PHP-DB] multi-language site

2004-01-15 Thread Hutchins, Richard
$.02 from a technical writer: If you're going to translate your content from English directly to a foreign language using machine translation (which is what gettext would amount to) be very careful. There is a difference between translation and localization. The free Babelfish service is a good ex

[PHP-DB] Unsubscribe User Fabio Farinelli - Headers Needed

2004-01-16 Thread Hutchins, Richard
PHP-List-Admin, Every time a user posts to the php-db list, the message below is automatically sent to the sender. This has been a problem for many months now and frequently sparks multiple requests from frustrated users to have [EMAIL PROTECTED] removed from the list. Can you please remove the us

RE: [PHP-DB] i want to unsubscribe

2004-01-19 Thread Hutchins, Richard
Other alternatives here: http://www.php.net/unsub.php > -Original Message- > From: V i s h a l Kashyap @ [Sai Hertz And Control Systems] > [mailto:[EMAIL PROTECTED] > Sent: Monday, January 19, 2004 1:53 AM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] i want to

RE: [PHP-DB] Unsubscribe (mailign lsits in general) question...

2004-01-20 Thread Hutchins, Richard
Tris, Here's what I found on infoworld.com in a very limited search (dated 1/12/04). There is info in there that should provide you with other avenues of research to clarify your company's responsibility. Here is a relevant excerpt: "CAN-SPAM [went into effect Jan 1., 2004] requires that spam e-m

RE: [PHP-DB] Paging large recordsets

2004-02-13 Thread Hutchins, Richard
I know phpclasses.org has a few recordset paging classes out there for your convenience. Might want to try on a couple of those too just to see if they fit. Rich > -Original Message- > From: Robert Twitty [mailto:[EMAIL PROTECTED] > Sent: Friday, February 13, 2004 1:34 PM > To: Karen Resp

RE: [PHP-DB] Problem with cookies

2004-02-16 Thread Hutchins, Richard
Normally, you get that warning when you've already sent display information to the browser before you attempt to use the header() function. You need to make sure you haven't sent ANY HTML to the browser prior to the header() line in your code. You can check the PHP documentation regarding the heade

RE: [PHP-DB] Interbase: How to get table structure via SQL ?

2004-02-18 Thread Hutchins, Richard
If you're using MySQL, you can use the DESCRIBE tablename command. There's a pretty straightforward (and easy to find) section on the DESCRIBE command in the MySQL documentation. > -Original Message- > From: DiZEM PGC [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 18, 2004 8:11 AM

RE: [PHP-DB] Interbase: How to get table structure via SQL ?

2004-02-18 Thread Hutchins, Richard
Sorry...just re-read the subject and realized you're using Interbase. Need coffee. ;) > -Original Message- > From: Hutchins, Richard [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 18, 2004 8:24 AM > To: 'DiZEM PGC'; [EMAIL PROTECTED] > Subject: RE:

RE: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Hutchins, Richard
Been kind of following this thread off and on... If the syntax is acceptable by MySQL, which it appears to be, is it possible that the variables you are using within the query string are not set to anything? Or is it possible that there is something broken immediately before the query string is fi

RE: [PHP-DB] passing parameter to function

2004-02-26 Thread Hutchins, Richard
Script 1: ...other form stuff as necessary... Submit the form. Script 2: Access the data passed in the hidden field as $_POST["codename"]. For example, echo $_POST["codename"]; Rich > -Original Message- > From: Robbie Staufer [mailto:[EMAIL PROTECTED] > Sent: Thurs

RE: [PHP-DB] Is there a limit to columns in a mysql table

2004-03-01 Thread Hutchins, Richard
1. What type of error is being returned by the database when your INSERT fails? 2. Does the INSERT work from the command line interface for your database? 3. What does the table structure look like (DESCRIBE tablename)? > -Original Message- > From: Piet from South Africa [mailto:[EMAIL PRO

RE: [PHP-DB] my code

2004-03-01 Thread Hutchins, Richard
For one thing, your column name Long is invalid. It's a reserved keyword in MySQL. Either enclose it in backticks or change the name of the column. If you want to see what the db is reporting, do this: $result = mysql_query($query) or die(mysql_error()) And see what the database tells yo

RE: [PHP-DB] mysql_num_rows

2004-03-03 Thread Hutchins, Richard
Craig, First off, where is the $db variable being set? You include it in: $result = mysql_query($query, $db); which is line 65, but, according to your function, it's not passed into the function as an argument and I don't see you setting $db equal to anything inside the function. Second, why ar

RE: [PHP-DB] No data being put into the DB

2004-03-04 Thread Hutchins, Richard
Yeah, I prefer the ... '".$_POST["varname"]."' ... syntax primarily because of the way my editor (EditPlus) highlights the code. I tried the braces syntax in EditPlus and it doesn't highlight the same way. I'll check out the editors you guys (Jason and Jeffrey) use to see if I like them and maybe I

RE: [PHP-DB] Php datetime

2004-03-04 Thread Hutchins, Richard
You also have the option of changing the column type to TIMESTAMP. With a TIMESTAMP column you don't have to do anything to get it to update automatically. Just do an INSERT into the table and the column will be updated automatically. Here's a snippet, but check the full MySQL documentation for mo

RE: [PHP-DB] Multiple deletes and updates...

2004-03-04 Thread Hutchins, Richard
Are you thinking about something like (off the top of my head, untested): for each of the people listed on your page? Then, in the script that handles the updating stuff, you simply do a foreach($_POST["update"] as $value){ $sql = "some UPDATE query using $value"; } foreach($_POST["

RE: [PHP-DB] Pulldown value not passed to next page

2004-03-11 Thread Hutchins, Richard
Karen, I'm assuming that when you say: > For some reason, > when Previous/Next are clicked, the value passed is still 15 > even though the pulldown says something else (5 or 15 or > whatever) you're drawing that conclusion because 15 images (or whatever) are displayed on the resulting page reg

RE: [PHP-DB] How to redirect after a valid login

2004-03-12 Thread Hutchins, Richard
Not to mention, the header() statement is being used incorrectly in the example code. You don't echo out the header() statement. You simply use it. For example... In your sample code, you include("mainmenu.php") which looks like it would output to the browser. You can't to that on the same pag

RE: [PHP-DB] Multiple Sorts

2004-03-16 Thread Hutchins, Richard
Robert, You should be able to just do: SELECT * FROM access_tracking WHERE user = '$user_id' ORDER BY time DESC,date_accessed ASC; Just experiment with the ORDER BY columns and the ASC and DESC orders to get the results you're looking for. Hope this helps, Rich > -Original Message- > Fr

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

2004-03-19 Thread Hutchins, Richard
I'd recommend you search the PHP archives for an answer. This question comes up a few times a year and the last time I remember seeing it, somebody (John Holmes, I think) provided an excellent discourse on the different ways to approach this solution. You'll probably get other new responses with r

RE: [PHP-DB] Testing - no emails since 11:45 AM 3/23/04

2004-03-23 Thread Hutchins, Richard
List has been quiet, but I (obviously) saw your post, Gary. Rich > -Original Message- > From: Gary Every [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 23, 2004 4:44 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Testing - no emails since 11:45 AM 3/23/04 > > > Testing, have receive

RE: [PHP-DB] Newbie question

2004-03-24 Thread Hutchins, Richard
Try: > -Original Message- > From: Gajo Csaba [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 24, 2004 4:10 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Newbie question > > > Hi! > I'm new to PHP, so this may be an easy question. I tried to make a > simple form-page, where the u

RE: [PHP-DB] password input type

2004-04-05 Thread Hutchins, Richard
It's presentation layer only - the data is not encrypted during transfer. Rich > -Original Message- > From: matthew perry [mailto:[EMAIL PROTECTED] > Sent: Monday, April 05, 2004 2:14 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] password input type > > > Does using a pasword input ty

RE: [PHP-DB] Where's the error?

2004-04-08 Thread Hutchins, Richard
If you "view source" on the page that's displaying nothing, is there any HTML code there? If so, search through it and let us know if there's a PHP error buried in the HTML code somewhere. > -Original Message- > From: Robert Sossomon [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 08,

RE: [PHP-DB] Where's the error?

2004-04-08 Thread Hutchins, Richard
ser. It'll save you some time searching around. Up to you though (obviously). Happy hunting! ;) > -Original Message- > From: Robert Sossomon [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 08, 2004 4:05 PM > To: 'Hutchins, Richard'; [EMAIL PROTECTED] >

RE: [PHP-DB] Session_Start won't work Help?

2004-04-09 Thread Hutchins, Richard
You can also use ini_set() in a script to change the directory for that specific script. However, as others have stated, the directory must exist and the Apache user must have permission to write to it. I don't know if ini_set() is any more/less secure than changing the php.ini file. I only know it

RE: Re[2]: [PHP-DB] Curious if include_once will work better than include

2004-04-13 Thread Hutchins, Richard
After a 2-second search of the PHP manual... "require() and include() are identical in every way except how they handle failure. include() produces a Warning while require() results in a Fatal Error. In other words, don't hesitate to use require() if you want a missing file to halt processing of t

RE: [PHP-DB] Macs and sessions

2004-04-20 Thread Hutchins, Richard
Are you certain that, for those users experiencing problems, cookies are enabled/accepted by their browsers? Just a guess. > -Original Message- > From: matthew perry [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 20, 2004 1:32 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Macs and sess

RE: [PHP-DB] Remove white space?

2004-04-22 Thread Hutchins, Richard
Robert, ltrim() or rtrim() to get rid of the whitespace if it's at the beginning or end of the data. strtolower() to turn the string into all lowercase characters. Rich > -Original Message- > From: Robert Sossomon [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 22, 2004 10:51 AM > To

RE: [PHP-DB] question on

2004-05-12 Thread Hutchins, Richard
You'd have to take the value of the first select box in your form and pass it to another script. You can do that by setting the form's ACTION property to either GET or POST. Personally, I prefer POST. In the script to which you submit your form, you can access the value of the select object thusly

RE: [PHP-DB] Re: inserting data into database!

2004-05-14 Thread Hutchins, Richard
Have you declared a new instance of the db class anywhere on your page? > -Original Message- > From: Ronald Allen [mailto:[EMAIL PROTECTED] > Sent: Friday, May 14, 2004 4:13 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Re: inserting data into database! > > > Now that I closed the bra

RE: [PHP-DB] Re: inserting data into database!

2004-05-14 Thread Hutchins, Richard
...or whatever class contains $row-> functionality? > -Original Message- > From: Ronald Allen [mailto:[EMAIL PROTECTED] > Sent: Friday, May 14, 2004 4:13 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Re: inserting data into database! > > > Now that I closed the bracket > it tells me

RE: [PHP-DB] Image / file uploader

2004-04-30 Thread Hutchins, Richard
Craig, Where is the code that actually handles the image upload? Is it in /~choffman/www/mtrain/client_profile.php? If so, can you post that too? Rich > -Original Message- > From: Craig Hoffman [mailto:[EMAIL PROTECTED] > Sent: Friday, April 30, 2004 10:08 AM > To: Hans Lellelid > Cc: [E

RE: [PHP-DB] Image / file uploader

2004-04-30 Thread Hutchins, Richard
Jinkeys! I had a hunch the problem was with that upload script. Nice catch, Hans! Rich > -Original Message- > From: Craig Hoffman [mailto:[EMAIL PROTECTED] > Sent: Friday, April 30, 2004 10:41 AM > To: Hans Lellelid > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Image / file uploader >

RE: [PHP-DB] how to reuse DB results

2004-05-20 Thread Hutchins, Richard
Off the top of my head, you could do the db call once, assign the full result set to an array, pull off the parts you want at the top of the page, then use reset($arrayname) to put the pointer back to the beginning of the array then use a loop to print out the whole thing at the bottom of the page.

RE: [PHP-DB] how to reuse DB results

2004-05-20 Thread Hutchins, Richard
-Original Message- > From: Aaron Wolski [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 20, 2004 4:26 PM > To: 'Hutchins, Richard'; [EMAIL PROTECTED] > Subject: RE: [PHP-DB] how to reuse DB results > > > Hi Richard! > > Thanks. > > Ok.. let me

RE: [PHP-DB] Version Upgrade

2004-05-21 Thread Hutchins, Richard
The folks at PHP.NET have an excellent resource to help answer questions like these. Check out this link: http://www.php.net/releases.php#4.3.0 You're going to have to read the material and compare it against what you're doing in your scripts to see if the 4.3.0 release is going to do anything to

RE: [PHP-DB] Inventory Management for ecommerce store

2004-05-21 Thread Hutchins, Richard
I have an e-commerce project coming up in the next quarter and I want to just piggyback (not hijack the thread) one question onto this thread. And that is, don't e-commerce packages come with the functionality to track inventory? I mean, most times when I shop online, I see whether an item is in st

RE: [PHP-DB] escape character

2004-06-09 Thread Hutchins, Richard
stripslashes()? -Original Message- From: Marie Osypian [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 09, 2004 9:22 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] escape character \"Fees and Expenses.\" Quick question: I am sending email via a simple script: \"QUOTED TEXT.\" is in the b

RE: [PHP-DB] problem....

2004-06-23 Thread Hutchins, Richard
Haven't seen that this has been solved yet so I thought I'd throw my two cents into the fray. First of all, I'd second the earlier suggestion that you assign your query to a variable. And, second, I'd recommend that you echo out your query to the browser just before it is submitted to the database

RE: [PHP-DB] [PHP]: session problem

2004-06-24 Thread Hutchins, Richard
So, on your second page you NEVER see the "Welcome..." get echoed out? It always forwards you to the user.php page? > -Original Message- > From: H. J. Wils [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 24, 2004 11:44 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [PHP-DB]

RE: [PHP-DB] [PHP]: session problem

2004-06-24 Thread Hutchins, Richard
OK then, couple more questions. 1. What is user.php? Is it the code you posted under "second page"? 2. Also, on your first page, are you sure that your $check_user_res = mysql_query($check_user_query) or die(mysql_error().": $check_user_query"); query is firing properly? If it isn't then your

RE: [PHP-DB] Re: $_SERVER['HTTP_REFERRER']

2004-07-09 Thread Hutchins, Richard
If you're looking for a workaround, one such method would be to put an on the referring form page and use that value to redirect back when processing is finished. Rich > -Original Message- > From: Torsten Roehr [mailto:[EMAIL PROTECTED] > Sent: Friday, July 09, 2004 1:52 PM > To: [EMA

RE: [PHP-DB] Getting a result from MAX() query

2004-07-13 Thread Hutchins, Richard
Sadly, I don't have any answers, only more questions. First, how do you know your query is returning a FALSE result? What test are you performing and what are the results of the test? Second, what type of column is fee_recd? I've been toying with the MAX() function on the command line with a num

RE: [PHP-DB] Re: Mysql and rollbacks

2004-07-13 Thread Hutchins, Richard
If memory serves me correctly, a couple of the PEAR database abstraction classes support rollback functionality. Of course, YMMV. Rich > -Original Message- > From: Peter Westergaard [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 13, 2004 11:24 AM > To: [EMAIL PROTECTED] > Subject: [PHP-D

RE: [PHP-DB] LAST_INSERT_ID?????

2004-07-15 Thread Hutchins, Richard
Scott, I typically use PHP's mysql_insert_id() function on a result. For example, the following snippet from a function I use: $result = mysql_query($sql) or die(mysql_error()); if(!$result){ $evNew = -1;//set evID to an impossible

RE: [PHP-DB] Begining PHP...Have Questions

2004-07-19 Thread Hutchins, Richard
Trade in those commas around your $_POST['username'] for some periods. Rich > -Original Message- > From: Aaron Todd [mailto:[EMAIL PROTECTED] > Sent: Monday, July 19, 2004 2:08 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Begining PHP...Have Questions > > > That makes great sence

RE: Re[2]: [PHP-DB] Begining PHP...Have Questions

2004-07-19 Thread Hutchins, Richard
But has that change (commas to periods) addressed the original problem you posted regarding the code not returning the results you expect? Rich > -Original Message- > From: Aaron Todd [mailto:[EMAIL PROTECTED] > Sent: Monday, July 19, 2004 3:14 PM > To: [EMAIL PROTECTED] > Subject: Re: R

RE: [PHP-DB] MySQL '!=' ???

2004-07-20 Thread Hutchins, Richard
Tris, Instead of using != in your statement, try using <>. I looked in my copy of the MySQL Manual and it shows both != and <> for the not equal concept, but the examples given only show the <> format used. Not sure if it'll solve the problem, but it's the first thing I'd try. Rich > -Orig

RE: [PHP-DB] Help with search form using multiple fields

2004-07-23 Thread Hutchins, Richard
I use PHP to check the search form's input fields then add them to the SQL statement if they contain data. And if you want the search to return all records from the table (let's hope there's not many then) if no search terms are provided then make the "WHERE" part of your SQL query an option based

RE: [PHP-DB] Re: LAMP

2004-08-03 Thread Hutchins, Richard
(tongue planted firmly in cheek...) Nyah, nyah, nyah...my database can beat up your database. Sheesh! You guys are killing me! If there was only ONE correct choice, we'd all be building online interfaces to our [EMAIL PROTECTED] Access '97 databases. And we would've missed out on the whole Pepsi

RE: [PHP-DB] SQL Insert problem

2004-08-05 Thread Hutchins, Richard
You're missing address2 in your list of values. This means that you have an unmatching number of column names and values in your query and that'll make the query bomb. Rich > -Original Message- > From: Vincent Jordan [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 05, 2004 10:25 AM >

RE: [PHP-DB] SQL Insert problem

2004-08-05 Thread Hutchins, Richard
n error but I do believe I have correct > syntax set to > display problems. > > > -Original Message- > > From: Hutchins, Richard [mailto:[EMAIL PROTECTED] > > Sent: Thursday, August 05, 2004 10:26 AM > > To: [EMAIL PROTECTED] > > Subject: RE:

[PHP-DB] Checkbox Array Question - Iteration

2004-08-17 Thread Hutchins, Richard
I am developing a page where people check off items for which they would like to volunteer. For now, this page has around 50 checkboxes on it, but it could conceivably change frequently and grow much larger than the current 50 items once it goes live. I have all of the checkboxes arranged into nic

RE: [PHP-DB] Re: Newbie Questions

2004-09-03 Thread Hutchins, Richard
Coming in late on this topic, but... Database. "SELECT firstname, lastname, address FROM TABLENAME ORDER BY lastname ASC"; Use ASC or DESC to order your query results. When you iterate over the result as Torsten indicated, everything will be in the order you specify. Check out the MySQL docs for

RE: [PHP-DB] Passing URL parameters, how to hide

2004-09-21 Thread Hutchins, Richard
It's really hard to tell what you mean by, "For whatever reason I can not use session only here. It does not return the correct record from the table. Maybe that doesn't make anysense." without looking at the code you have. However, the session does not, itself, actually return any of your data. T

RE: [PHP-DB] I have a query

2004-09-29 Thread Hutchins, Richard
Just an addendum to Bastien's post: You'll need MySql 4.0+ if you want to use UNION. > -Original Message- > From: Bastien Koert [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 29, 2004 2:15 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: RE: [PHP-DB] I have a query > >

RE: [PHP-DB] Names with apostrophe's

2004-09-29 Thread Hutchins, Richard
urlencode() or one of the related functions? Not sure, but the docs looked reassuring. > -Original Message- > From: Craig Hoffman [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 29, 2004 2:23 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Names with apostrophe's > > > Hello, >

RE: [PHP-DB] String handling

2004-09-30 Thread Hutchins, Richard
If you use the value from a text box in a mathematical equation or comparison, PHP will automatically attempt to handle it as an integer or some other numeric type (e.g., float). So if you did something like: if($_POST["myvar"] < 1){ ... } PHP would handle $_POST["myvar"] as an integer aut

RE: [PHP-DB] Auto-increment questions...

2004-10-05 Thread Hutchins, Richard
As a record ID, you shouldn't really worry about the numbers being sequential without gaps - they're just a way of assigning a unique number to a record in the db. However, if you need the record's id to be sequential because you're going to use it as a piece of actual data to be displayed to your

RE: [PHP-DB] -14 Days Ago

2004-10-08 Thread Hutchins, Richard
Cole, I don't know the full context of how you need to do your date math. However, what if, instead of selecting a bunch of data and putting it in an array in PHP then checking to see if its older than 14 days you wrote your query to pull only those records that are older than 14 days? Something

RE: [PHP-DB] Database Design Recommendations

2004-11-02 Thread Hutchins, Richard
Eric, There are, as you will find out, a number of ways you could handle it. The "right" way is really your decision and it's directly related to the flexibility, maintainability, and security your site will require. I have had success in the past using a role-based permission system. For example

RE: [PHP-DB] Book recommendation for using MySQL w. PHP

2004-11-04 Thread Hutchins, Richard
Rene, My _opinion_ only here, but I own the Welling and Thompson book and used it when I was starting out with PHP and MySQL but don't use it much anymore. I have found much better information and practical advice in the MySQL manual and in the MySQL forums. I'm not ragging on the W & T book by an

RE: [PHP-DB] Trying to connext to MySQL with PEAR

2005-01-06 Thread Hutchins, Richard
What version of PHP? What version of MySQL? -Original Message- From: Jason Davis [mailto:[EMAIL PROTECTED] Sent: Thursday, January 06, 2005 10:42 AM To: php-db@lists.php.net Subject: [PHP-DB] Trying to connext to MySQL with PEAR Hi all I am new to PHP and am trying to connect to mysql fo

RE: [PHP-DB] php5 busts php4 code

2005-01-20 Thread Hutchins, Richard
No default support for MySQL in PHP 5. Did you enable it manually? Rich -Original Message- From: Hassan Ebrahimi-Nuyken [mailto:[EMAIL PROTECTED] Sent: Thursday, January 20, 2005 2:06 PM To: php-db@lists.php.net Subject: [PHP-DB] php5 busts php4 code Hi, I am running: apache 2.0.52 My

RE: [PHP-DB] checkboxes

2005-01-21 Thread Hutchins, Richard
Probably all you need to do is name your checkboxes as an array thusly: name="completed[]" Then you can access the array on your update page and do whatever you wish with it. Hope this helps. Rich -Original Message- From: Craig Hoffman [mailto:[EMAIL PROTECTED] Sent: Friday, January 21

RE: [PHP-DB] checkboxes

2005-01-21 Thread Hutchins, Richard
ard Hutchins Subject: Re: [PHP-DB] checkboxes I've tried that and it still doesn't bring over the other checkboxes that have been checked. Plus when I echo it out I get Array instead of the variable name. On Jan 21, 2005, at 3:14 PM, Hutchins, Richard wrote: > Probably all y

RE: [PHP-DB] Out of the Office

2005-01-24 Thread Hutchins, Richard
Agh! You have GOT to be friggin' kidding me! These autoresponders and the whole discussion of how they work or don't work are just cluttering up this list. Please just everybody do everybody else a favor and _think_ before you use/configure your autoresponder and take the whole other

RE: [PHP-DB] Double Inserts

2005-01-25 Thread Hutchins, Richard
Please post ALL relevant code. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 25, 2005 12:32 PM To: php-db@lists.php.net Subject: [PHP-DB] Double Inserts Hi, I am new to the mailing list and to PHP / MySQL. I am facing an unususal problem. I a

RE: [PHP-DB] empty set query

2005-02-08 Thread Hutchins, Richard
Many ways to remove the epidermis from a feline, but... You may want to do something equivalent (I think you're using mysqlite) to the mysql_num_rows() function on your result set as a condition to running your while loop . In pseudocode... if(mysql_num_rows($result_set) < 1){ echo out s

RE: [PHP-DB] Re: Is there anything non commercial pdf lib to crea te PDF file from PHP ?

2005-02-10 Thread Hutchins, Richard
Or ezPDF http://www.ros.co.nz/pdf/ I've used it and it's easy to use as advertised. Rich -Original Message- From: Stefan Reimers [mailto:[EMAIL PROTECTED] Sent: Thursday, February 10, 2005 5:26 AM To: php-db@lists.php.net Subject: [PHP-DB] Re: Is there anything non commercial pdf lib to

RE: [PHP-DB] problem with login script

2002-06-14 Thread Hutchins, Richard
I haven't been following your whole thread on this issue, but I did notice that the syntax for your include statement is incorrect. Try this: I've been working with includes recently and that's the standard syntax. Furthermore, if you put the functions.php file in a different directory, remembe

RE: [PHP-DB] Last ID from database?

2002-06-26 Thread Hutchins, Richard
Chris, $insertID = mysql_insert_id(); Check http://www.php.net/manual/en/function.mysql-insert-id.php for additional info. Rich -Original Message- From: Chris Payne [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 3:57 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Last I

RE: [PHP-DB] storing content data outside the application

2002-07-02 Thread Hutchins, Richard
Without knowing what you really are trying to accomplish... I've had very good results with the following bit of code: //scan the directory and load its contents into an array $handle=opendir($dir); while (false !== ($file = readdir($handle)))

[PHP-DB] Refresh after DB Query

2002-07-02 Thread Hutchins, Richard
OK, loosely related to the database topic on this list. I have a page that displays the contents of a contact list in an HTML table. The contents are pulled from a MySQL db with a standard PHP query. Nothing special happening there. In this table, I put Edit and Delete links to maintain each line

[PHP-DB] RE: Refresh after DB Query - Solved

2002-07-03 Thread Hutchins, Richard
Ugh! Thanks, Adam. I knew it would be something stupid. Although I am kind of new (less than 6 months) to PHP, I'm really not that bad with it (IMHO). I really thought I had tried putting the DELETE stuff where you said to put it and it didn't work. However, new day, fresh eyes, your advice...it w

RE: [PHP-DB] passing variables from one page to another

2002-07-08 Thread Hutchins, Richard
Matthew, have you tried running your query from the command line in MySQL? If you can do that successfully, that'll prove that the query is functioning properly and the problem can be tracked elsewhere. -Original Message- From: Matthew K. Gold [mailto:[EMAIL PROTECTED]] Sent: Monday, July

[PHP-DB] PHP Security and Code Design

2002-07-10 Thread Hutchins, Richard
OK, so I was really bored today and started reading through some PHP security stuff starting with the php.ini-recommended and found the register globals off stuff. So you don't have to find it yourself, here's a direct lift from the file: ; This is the recommended, PHP 4-style version of the php.

RE: [PHP-DB] PHP Security and Code Design

2002-07-10 Thread Hutchins, Richard
Thanks, Adam. All clear now. Rich -Original Message- From: Adam Alkins [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 4:28 PM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] PHP Security and Code Design > I understand that this applies to data put into a form to be submitted to

RE: [PHP-DB] ID numbers not sorting Properly

2002-07-12 Thread Hutchins, Richard
Would using sort($result); solve the problem? I believe the default sort order is ascending. Try using sort($result) before your while($myrow = mysql_fetch_array($result)) statement and see if that fixes things. I also noticed that you don't use an ORDER BY clause in your sql statement, but if th

RE: [PHP-DB] Log application...

2002-07-24 Thread Hutchins, Richard
Not sure if this will actually deliver the functionality you're looking for but it's worth a shot. As the documentation says, the end(array array) actually returns the last element in the array. So it looks like you could just use echo end(yourArrayName); or something like that and get what you're

RE: [PHP-DB] mysql_fetch_array limit? - more details

2002-07-30 Thread Hutchins, Richard
One thing I haven't seen yet is a cut-n-paste of your db tables. Could you post that to this list? Maybe there's something you're overlooking there? Maybe seomebody will find something amiss there. I know it sounds simple and you might think you have it all down right, but how many times have you

RE: [PHP-DB] adding a space in mysql

2002-07-31 Thread Hutchins, Richard
I haven't set up any text-based searches before, but when you say: If the user types 'Wash' I don't want any matches for 'Washington', 'Washing', etc. Aren't you, in essence, saying that you want to search for "Wash"? Meaning that your query could just say WHERE name = '$var' (where $var is set

RE: [PHP-DB] PHP and XML

2002-08-13 Thread Hutchins, Richard
A question better suited for the php-general list, but check out: http://www.php.net/manual/en/function.htmlspecialchars.php and/or http://www.php.net/manual/en/function.htmlentities.php hth, Rich -Original Message- From: Bernard [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 13, 20

RE: [PHP-DB] SELECT statement problem

2002-08-15 Thread Hutchins, Richard
Can you echo out the sql going in and any errors you're getting when the query doesn't work then post that info to this list? It'll help both you and us diagnose what might be going wrong. In addition, what datatype are the columns named start and end in your database? (Assuming database is MySQL

RE: [PHP-DB] Date Subtraction

2002-08-21 Thread Hutchins, Richard
Manoj, Just a couple of thoughts: First, I know this particular topic has been discussed here recently, so you might want to search the archives for more exhaustive information. Second, if you're using MySQL, check out the functions DATE_ADD() and MOD(). They're MySQL functions, so you'll have t

RE: [PHP-DB] Date Subtraction

2002-08-21 Thread Hutchins, Richard
Oh, in MySQL, there's also DATE_SUB(). Forgot to mention that one. Rich -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 21, 2002 2:40 PM To: 'Manoj Japher'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Date Subtraction Manoj, J

RE: [PHP-DB] how to hide source code??

2002-08-29 Thread Hutchins, Richard
Forgive me for sticking my nose in the middle of this, but stupid question here: This sounds like more of an architectural thing. A further abstracted view of the information you're dealing with. You (Smita) stated that the admin needs to see all of the data and you're concerned about him (or her

RE: [PHP-DB] MySQL/PHP

2002-08-30 Thread Hutchins, Richard
Pretty basic tutorial that covers a lot of topics. If you buy the book, there's a little more depth. On my first day working with PHP/MySQL, I had basic pages up and running. http://www.webmasterbase.com/article/228 -Original Message- From: Beau Lebens [mailto:[EMAIL PROTECTED]] Sent: Fr

RE: [PHP-DB] Indepth Tutorial... need help.

2002-09-03 Thread Hutchins, Richard
Just one more to throw on the fire: Pretty basic tutorial that covers a lot of topics. If you buy the book, there's a little more depth. On my first day working with PHP/MySQL, I had basic pages up and running. http://www.webmasterbase.com/article/228 Incidentally, this same question was asked

RE: [PHP-DB] Form question.......

2002-09-05 Thread Hutchins, Richard
Another option would be to break your one form into two separate forms where the first form asks for this number, checks the database, then transfers to user to the next logical page (rest of form or re-enter data) based on the results of that query to the db. I'm not saying it's anywhere near th

RE: [PHP-DB] data by link

2002-09-05 Thread Hutchins, Richard
You have to append the data to the href then access the variable and its value on a resulting page. In general, it would look like this (I'm sure the list will point out any syntax errors I have made): To send the data to another page: Click here To use the variable on another page (page.php): $

RE: [PHP-DB] php -> checkboxes -> mysql

2002-09-10 Thread Hutchins, Richard
Also check the archives for the php-db list. Questions very similar to this get asked just about every week and you might be able to find more information there. Rich -Original Message- From: nikos [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 10, 2002 7:51 AM To: PHP-mailist Subje

RE: [PHP-DB] how to hide my code?

2002-09-18 Thread Hutchins, Richard
There are javascripts out there to disable the View Source option when the user right clicks on your page. Disables for the whole page though, not just a section of your code. Search here: http://search.internet.com/www.javascriptsource.com Thing is, scripts like those are easily defeated and the

  1   2   3   4   >