RE: [PHP-DB] Query executing

2007-10-05 Thread Hutchins, Richard
The mysql_affected_rows() function will tell you how many rows were affected by the DELETE query you just fired. You can also test for TRUE or FALSE on the mysql_query() function if you just want to know if the query was successful or not. Rich -Original Message- From: ron.php [mailto:[E

RE: [PHP-DB] Array

2006-09-29 Thread Hutchins, Richard
Use the strtolower function to reduce all letters to lower case. Then use the stripos() function to find where the spaces are in the string and use that position in the substr() function to parse out the individual words in the string. From there you can put the chunks into an array or a query or

RE: [PHP-DB] Serialize

2006-05-24 Thread Hutchins, Richard
Simon, You really should run at least the mysql_real_escape_string function as one part of a defense against SQL injection attacks. "Serialize"-ing really only converts your array into a format the database can store and retrieve; it doesn't do anything to protect you from intentional or unintenti

RE: [PHP-DB] WAMP

2006-03-15 Thread Hutchins, Richard
WAMP5. I use it myself. http://www.en.wampserver.com/ Rich -Original Message- From: Philip Pryce [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 15, 2006 11:55 AM To: php-db@lists.php.net Subject: Re: [PHP-DB] WAMP apache triad 2 is good, http://apache2triad.net/ very well tested. b

RE: [PHP-DB] Convert String to Array

2005-09-30 Thread Hutchins, Richard
Is it possible for you to store the vehMdlCd array as a serialized field in your database? I'm not sure how your data is structured, but you would serialize() your data on the way into the db then unserialize() it when you select it. When it's unserialized, you'll get it back in the original array

RE: [PHP-DB] adding to the current value

2005-09-29 Thread Hutchins, Richard
You do it by: UPDATE my_table set field_1 = field_1 - 1 [...add any where statements here] Bastien pretty much answered your question because the example you provided was, in theory, correct. Besides, unless you're messing with a production system, you could always just try out simple stuff like

RE: [PHP-DB] PHP vs. ASP

2005-09-28 Thread Hutchins, Richard
Google: php vs asp Just south of 4 Million results. Plenty of information there. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 28, 2005 9:56 AM To: php-db@lists.php.net Subject: [PHP-DB] PHP vs. ASP Hi! (1) How does PHP compare to ASP?

RE: [PHP-DB] Lock Tables Privileges

2005-08-15 Thread Hutchins, Richard
If you're GRANTing privileges to mydb.* why is the error message reporting that you are not allowed access to the database 'registration'? >GRANT ALL PRIVILEGES ON mydb.* TO 'thisUser'@'localhost' IDENTIFIED BY >'myPassword'; >ERROR 1044 (42000): Access denied for user 'thisUser'@'localhost' to

RE: [PHP-DB] mysql not valid resource

2005-08-09 Thread Hutchins, Richard
Marco, Have you tried echoing out the sql statement to the browser before it gets sent to the database? That would show you the exact query string and give you a chance to see where the error might reside. $sql="select distinct des_riga, count ( des_riga ) as freq from k_riga where id_tabella=" .

RE: [PHP-DB] problems with a script

2005-05-12 Thread Hutchins, Richard
Rally depends on what you mean by "...does not post the data to the database." Can you confirm that you can connect to the database on your ISP's server? Can you echo out the query string and see output that accurately reflects what you expect to be sent to the server? Does PHP or the databa

RE: [PHP-DB] Content Management

2005-03-22 Thread Hutchins, Richard
Peter, Unfortunately it's not a PHP solution, but I recently launched a site for a client and used the Macromedia Contribute product and Dreamweaver Templates to allow the user to maintain certain areas of the site. Now, before everybody else on the list blasts it, I'm not here touting Macromedia

RE: [PHP-DB] Urgent DATA help needed

2005-03-22 Thread Hutchins, Richard
Can't you let the user tell you how many days back they want to count then just use that value in a query with the date calculation functions available in MySQL? You didn't specify your db type, but MySQL makes date calculations pretty easy. Check that out and see if it gives you something usable.

RE: [PHP-DB] Re: paginating : optimising queries

2005-03-22 Thread Hutchins, Richard
"nonesense"?? Sorry, couldn't resist, Martin. ;) This isn't a spelling bee anyway. I don't think it actually matters to anybody. I'll take solid programming advice with a few spelling errors over a shot in the dark with perfect spelling any day. -Original Message- From: Martin Norland [m

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

[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] 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:

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] 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] 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] 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: 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] 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: [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] 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] 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: $_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] [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] [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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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: 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] 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: [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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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

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

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

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

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] 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] 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] imagecreatetruecolor ?

2003-11-13 Thread Hutchins, Richard
Are you talking about the thumbnail when viewed in your browser? If so, that's to be expected since the browser palette (depending on the brand) will only render a max. of around 255 colors. Don't quote me on this, but I'm pretty sure Internet Explorer's palette is limited to 255 colors while Netsc

RE: [PHP-DB] about some MySQL basics

2003-11-11 Thread Hutchins, Richard
A VERY, VERY quick list of some resources that may help you out. There are many more. Excellent starter's book by Kevin Yank is available here: http://www.sitepoint.com/article/228 When I first started, I used it and had stuff up and running in an hour. Also, look on Amazon for PHP and MySQL Dev

RE: [PHP-DB] Select Value with 's

2003-11-05 Thread Hutchins, Richard
You are most welcome, Aleks. Glad it helped. > -Original Message- > From: Aleks @ USA.net [mailto:[EMAIL PROTECTED] > Sent: Wednesday, November 05, 2003 3:01 PM > To: 'Hutchins, Richard'; 'PHP-DB' > Subject: RE: [PHP-DB] Select Value with 's

RE: [PHP-DB] Select Value with 's

2003-11-05 Thread Hutchins, Richard
Using your variables and query, the following, based on one of my own functional pages, the following should work: $FF = addslashes($_POST[Cid]); $info = mysql_query("Select * From customer Where customer.customer LIKE '$FF' "); Give it a shot. Hope this helps. Rich > -Original Message

RE: [PHP-DB] Update Query

2003-10-29 Thread Hutchins, Richard
e exact excerpt from the source of the > web browser > > > > The My Sql Error is > > Query failed : You have an error in your SQL syntax near '' at line 1 > > I have tried entering () around the select statement but that > seamed to make > more erro

RE: [PHP-DB] UNSUBSCRIBE PLEASE (FW: L'utente Fabio Farinelli ha cambiato indi rizzo di posta elettronica.)

2003-10-29 Thread Hutchins, Richard
o:[EMAIL PROTECTED] > Sent: Wednesday, October 29, 2003 3:29 PM > To: PHP DB list > Cc: Hutchins, Richard > Subject: Re: [PHP-DB] UNSUBSCRIBE PLEASE (FW: L'utente Fabio Farinelli > ha cambiato indi rizzo di posta elettronica.) > > > Richard -- > > ...and then Hutchi

[PHP-DB] UNSUBSCRIBE PLEASE (FW: L'utente Fabio Farinelli ha cambiato indi rizzo di posta elettronica.)

2003-10-29 Thread Hutchins, Richard
Can the list admin please remove this user from the list? Every post I make results in the reply below. > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 29, 2003 3:14 PM > To: Hutchins, Richard > Subject: L'utent

RE: [PHP-DB] Update Query

2003-10-29 Thread Hutchins, Richard
How do you know it failed? What is the mysql_error() returning to you? I'd also recommend you echo out the query to the browser window before sending it so you can see exactly what's being sent to the database. That'll help you troubleshoot SQL problems on your own. > -Original Message- >

RE: [PHP-DB] acquiring value from a sql statement which contains an alias

2003-10-21 Thread Hutchins, Richard
Shahmat, I have the following table in my MySQL db: mysql> describe news; +---+--+--+-+-++ | Field | Type | Null | Key | Default | Extra | +---+--+--+-+-+--

RE: [PHP-DB] Using two colomns of mysql data as key/value pairs i n arrays

2003-10-20 Thread Hutchins, Richard
--- > From: Chris Boget [mailto:[EMAIL PROTECTED] > Sent: Monday, October 20, 2003 10:26 AM > To: Hutchins, Richard; [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Using two colomns of mysql data as > key/value pairs > in arrays > > > > result set. Chris, you've made a b

  1   2   3   4   >