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: ? include(functions.php); ? I've been working with includes recently and that's the standard syntax. Furthermore, if you put the functions.php

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

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

[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

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,

[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

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

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

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: snip If the user types 'Wash' I don't want any matches for 'Washington', 'Washing', etc. snip 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

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,

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

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

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, Just a couple

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

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:

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

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: a href=foo.php?variable1=value1variable2=value2Click here/a

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

RE: [PHP-DB] I need some information!!!

2002-09-25 Thread Hutchins, Richard
Rodrigo, Check the PHP-DB archives from yesterday and the day before. Lots of comments about this very subject. Happy hunting. Rich -Original Message- From: Rodrigo [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 2:32 PM To: PHP Subject: [PHP-DB] I need some

RE: [PHP-DB] Current row of query

2002-09-26 Thread Hutchins, Richard
Not sure here, but you might also run into a problem if you start your if statement with $i=0. If PHP does not treat the value 0 as even or odd, your first row is most likely going to be purple along with your second row. I know it's nitpicky, but I could see myself spending half an hour trying

RE: [PHP-DB] Need help urgent!!

2002-09-26 Thread Hutchins, Richard
What's you register_globals set to? -Original Message- From: Thomas omega Henning [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 12:49 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Need help urgent!! I'm using PHP4.2.2 Win with MySQL 3.2.52 Win and PHP doesn't

[PHP-DB] Return Array from Function

2002-09-26 Thread Hutchins, Richard
Can somebody tell me what I might be doing wrong in the code below? I'm trying to use a function to perform an often-used db query and return the resulting resource to the calling script. I keep getting this error though: Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or

RE: [PHP-DB] Return Array from Function

2002-09-26 Thread Hutchins, Richard
Sorry, line 51 is the one that reads: $1contentID=$row[1contentID]; -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 4:19 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Return Array from Function Can somebody

RE: [PHP-DB] Return Array from Function - SOLVED

2002-09-26 Thread Hutchins, Richard
save you some. ;) Thanks for the help. -Original Message- From: Dave Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 26, 2002 4:31 PM To: Hutchins, Richard Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Return Array from Function Try single-quotes instead of double

RE: [PHP-DB] variable names

2002-10-01 Thread Hutchins, Richard
Without more detail about your code, my first guess would be your register_globals setting in php.ini. In PHP 4.2.x it's set to OFF which means you have to refer to your variables like this example: $_POST[varname]; -Original Message- From: Brendan Flynn [mailto:[EMAIL PROTECTED]]

RE: [PHP-DB] Multiple select

2002-10-01 Thread Hutchins, Richard
rename your select lists with array brackets at the end 'listbox1[]' all of your values will be passed to the next page as an array -Original Message- From: Wilmar Perez [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 01, 2002 12:47 PM To: php-db mailing list Subject: [PHP-DB]

RE: [PHP-DB] Sending E-Mail

2002-10-03 Thread Hutchins, Richard
FYI... Not sure what your intentions are, but you can also send the form data from ANY form by putting the mailto:[EMAIL PROTECTED] statement in the action property of the form and using the POST method (I don't think it'll work with GET). You'll generate an e-mail with an attachment that

[PHP-DB] Pulling apart select list elements

2002-10-03 Thread Hutchins, Richard
OK, so this probably is a bit off topic, but the results of these actions will be placed into a MySQL database. Close enough? I have a select multiple/select object named list[] that is passing its selected contents to an array. That part works fine. I can use a for loop to grab all of the

RE: [PHP-DB] Advanced search scripts

2002-10-09 Thread Hutchins, Richard
John (and list), Do you know if MySQL 4.0.x and PHP 4.2.x are fully compatible? I'm interested in the topics you have been discussing in this thread and don't really want to pursue upgrading MySQL if the support is only experimental at this stage (i.e. Apache 2.0). Thanks, Rich -Original

RE: [PHP-DB] images

2002-10-15 Thread Hutchins, Richard
This has been asked many times before, but unless you have a really good reason for storing the image in the database, don't. Instead, upload the image file to a directory on the server and store the URL to the image in the database. Fewer db resources are consumed. -Original

RE: [PHP-DB] MySql Statement inside a function?

2002-10-18 Thread Hutchins, Richard
Dave, I'd agree with Rob especially about returning the results. Plus it's always a good idea to add error checking to your SQL statement. Try replacing your existing line of code with this to make sure you query is actually returning valid results before trying to operate on them. $gnlistres =

RE: [PHP-DB] DB Print Columns and Rows

2002-10-24 Thread Hutchins, Richard
Something like this should also work for you. table ?php while($row=mysql_fetch_array($sqlResult){ $var1=$row[col1]; $var2=$row[col2]; //etc., etc. echo(trtd.$var1./tdtd.$var2./td/tr; } ? /table -Original Message- From: [EMAIL PROTECTED]

RE: [PHP-DB] DB Print Columns and Rows

2002-10-24 Thread Hutchins, Richard
Sorry, fixed a syntax error in my original post. -Original Message- From: Hutchins, Richard [mailto:Richard.Hutchins;GetingeCastle.com] Sent: Thursday, October 24, 2002 10:59 AM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] DB Print Columns and Rows Something

RE: [PHP-DB] Inserting checkbox data

2002-10-25 Thread Hutchins, Richard
In addition to what Mihail had to say, I saw a couple of minor things as well. I'm not sure if they're the cause of or solution to the problem you're experiencing. First, I'm pretty sure that a value of value=\Y\ is not valid HTML. I don't know what it does to your name/value pair when you POST

RE: [PHP-DB] URGET HELP : Logic Help - for first record do_this for each record after do_that

2002-10-25 Thread Hutchins, Richard
What about wrapping your logic in a counter? Set $count=1, if($count=1){do_this; then $count++;} else{do_that}. Wouldn't really add any overhead to your script since the counter only gets incremented once when the if() statement is true then stays at 2 and executes the else{} stuff after that.

RE: [PHP-DB] sort by date

2002-11-06 Thread Hutchins, Richard
Just to weigh in on the tail end here, a FAQ of the top N items would be nice. But I have to say, I use the archives a lot before I post to the list. The archives contain the answers to most questions out there. If subscribers to this list checked the archives to see if their answer is there, then

RE: [PHP-DB] sort by date

2002-11-06 Thread Hutchins, Richard
] Sent: Wednesday, November 06, 2002 10:42 AM To: Hutchins, Richard; [EMAIL PROTECTED] Subject: Re: [PHP-DB] sort by date What archive and how do I access it? -Original Message- From: Hutchins, Richard [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Wednesday

RE: [PHP-DB] Variables

2002-11-08 Thread Hutchins, Richard
It would seem that your IF statement, as it is written below, evaluates to true every time because I'm guessing that the hexadecimal value of the string timeb is larger than the hexadecimal value of timea. Like I said, just a guess. I'm also guessing that you actually want to compare two values

RE: [PHP-DB] payperiods

2002-11-12 Thread Hutchins, Richard
I don't know what your application or requirements are, but here's something to think about... If each pay period will ALWAYS be in two week increments from the date you hard code, then you're fine just hard coding the first one and incrementing automatically after that. However, if you're in one

RE: [PHP-DB] Displaying a single picture...

2002-11-12 Thread Hutchins, Richard
The link for your image: a href=displaypage.php?image=imagename.jpg target=_blankClick Here/a The code for displaypage.php HTML head blah... /head body ?php echo img src=\.$_GET[image].\ ? /body /HTML Something like this should be all you'll need. A little

RE: [PHP-DB] Multiply Auto_Increments

2002-11-13 Thread Hutchins, Richard
Sounds like a looping problem in your code. Can you supply the code around your INSERT statement so we can see what's going on? The only times I've experienced anything Roswell about MySQL is when I've written bad code. Rich -Original Message- From: Toby Parkins

RE: [PHP-DB] Multiply Auto_Increments

2002-11-13 Thread Hutchins, Richard
Looking at the code you've pasted in below, I don't see anything that would result in one valid row plus additional blank rows. Is the code you supplied in a script with any control structures like IF, WHILE, or FOR? Is it included into a script in the middle of a control structure? If you

RE: [PHP-DB] checking for 0 results?

2002-11-15 Thread Hutchins, Richard
Aaron was right initially: $sql = select * from ietsfuckingfriday; $result = mysql_query($sql); $num_rows=mysql_num_rows($result); Somewhere along the line, things got convoluted, but that's how you check for 0 rows returned from a query. -Original Message- From: Snijders, Mark

RE: [PHP-DB] Email Encryption?

2002-11-15 Thread Hutchins, Richard
Can you explain how e-mail fits into the Admin solution? What is the e-mail used for? Setting up the accounts/passwords or sending the account/password to the user? -Original Message- From: Aaron Wolski [mailto:aaronjw;martekbiz.com] Sent: Friday, November 15, 2002 11:39 AM To: 'Aaron

RE: [PHP-DB] Email Encryption?

2002-11-15 Thread Hutchins, Richard
it used in various places. -Original Message- From: Aaron Wolski [mailto:aaronjw;martekbiz.com] Sent: Friday, November 15, 2002 11:47 AM To: 'Hutchins, Richard'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Email Encryption? The user account is setup via the Admin util. The details

[PHP-DB] Query Executes in MySQL Command Line, Not From PHP.

2002-11-15 Thread Hutchins, Richard
I'm having problems with a query. The query as it reads in my code is: $sql_element_low = UPDATE $table SET medialow=NULL WHERE .$_POST[tbl].contentID=.$_POST[id].; All of the varibles get passed as expected. I know this because if I echo the SQL out to the page, I get: UPDATE levelone SET

RE: [PHP-DB] Query Executes in MySQL Command Line, Not From PHP.

2002-11-15 Thread Hutchins, Richard
to be right. -Original Message- From: Marco Tabini [mailto:marcot;inicode.com] Sent: Friday, November 15, 2002 3:52 PM To: Hutchins, Richard Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Query Executes in MySQL Command Line, Not From PHP. I don't think you can have column names that start

RE: [PHP-DB] Query Executes in MySQL Command Line, Not From PHP.

2002-11-15 Thread Hutchins, Richard
frustrating. -Original Message- From: Marco Tabini [mailto:marcot;inicode.com] Sent: Friday, November 15, 2002 4:14 PM To: Hutchins, Richard Cc: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Query Executes in MySQL Command Line, Not From PHP. Uhm... are you sure it's not working? It's

RE: [PHP-DB] Query Executes ... SOLVED

2002-11-15 Thread Hutchins, Richard
). -Original Message- From: Hutchins, Richard [mailto:Richard.Hutchins;GetingeCastle.com] Sent: Friday, November 15, 2002 4:31 PM To: 'Marco Tabini' Cc: [EMAIL PROTECTED] Subject: RE: [PHP-DB] Query Executes in MySQL Command Line, Not From PHP. It's definitely not working

RE: [PHP-DB] Passing by reference

2002-11-18 Thread Hutchins, Richard
Rasmus, Peter and I were discussing the use of .$myvar. vs quoted string {$myvar} more quoted string in a separate thread. Is there a performance or compatibility advantage to using the concatenated version as you suggest in your message below? I currently use the concatenated version in all

RE: [PHP-DB] Fastest, easiest Flatfile DB with PHP

2002-11-18 Thread Hutchins, Richard
I've read the other posts and agree with them wholeheartedly - sounds like you actually should investigate using some sort of relational db, MySQL or otherwise. However, if there is some major reason you don't or can't use a relational database, you may want to consider storing your flat files

RE: [PHP-DB] Insert path string into Mysql

2002-11-18 Thread Hutchins, Richard
You might also want to look into using addslashes($path), especially if you're going to be accepting this path info from a text box. http://www.php.net/manual/en/function.addslashes.php -Original Message- From: Steve Cayford [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002

RE: [PHP-DB] HTML Forms question...

2002-11-19 Thread Hutchins, Richard
Not only does Mike's description below work really well for a single page, if you write all of your JS stuff like this, you can very easily use the same script on multiple pages. Portability! Works great for me. -Original Message- From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]] Sent:

RE: [PHP-DB] HTML Forms question...

2002-11-19 Thread Hutchins, Richard
=javascript:myfunction(objectName)) as long as the function is included in the page. Sorry for any confusion. -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 1:45 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] HTML Forms question... Not only

RE: [PHP-DB] HTML Forms question...

2002-11-19 Thread Hutchins, Richard
I think it's because you're incrementing $a BEFORE you echo it out. That would cause your echo statement to start at the second item [1]. -Original Message- From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 19, 2002 3:36 PM To: '1LT John W. Holmes'; 'Ryan

RE: [PHP-DB] how to clear the array

2002-11-21 Thread Hutchins, Richard
If you have a variable: $myArray = array(); Can't you clear it by saying unset($myArray)? According to the documentation, it looks like you should be able to. -Original Message- From: Dave Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 21, 2002 1:12 AM To: karthikeyan;

RE: [PHP-DB] how to clear the array

2002-11-21 Thread Hutchins, Richard
never actually done it before, so I'm not versed in the ins and outs of unsetting elements of an array. http://www.php.net/manual/en/function.unset.php -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 21, 2002 8:30 AM To: [EMAIL PROTECTED

RE: [PHP-DB] inserting html into mysql tables

2002-11-21 Thread Hutchins, Richard
You're also, at the very least, going to want to escape out the characters in the HTML code that could cause problems with your query (e.g. , '). To do this, you'd use the addslashes() function prior to inserting the data into the database. -Original Message- From: Adam Voigt

RE: [PHP-DB] INSERT question. 2 pointers.

2002-11-22 Thread Hutchins, Richard
Actually, according to the MySQL manual and experience, if you don't want to insert data into each column in a table, you can specify the columns you DO want to insert data into. See below: $sql = INSERT INTO myTable (col1,col3,col4) VALUES ('$val1','$val2','$val3'); As you can see, the above

RE: [PHP-DB] Here goes!

2002-12-06 Thread Hutchins, Richard
You're missing the mysql_query($sql) or die(mysql_error()); to actually fire the data into the db. Hope this helps. -Original Message- From: John [mailto:[EMAIL PROTECTED]] Sent: Friday, December 06, 2002 3:50 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Here goes!

RE: [PHP-DB] Enlarging tables

2002-12-09 Thread Hutchins, Richard
What kind of table? Can you provide your table creation script or the output of mysqldescribe tablename; -Original Message- From: mike karthauser [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 9:48 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Enlarging tables We have

RE: [PHP-DB] Enlarging tables

2002-12-09 Thread Hutchins, Richard
By definition a tinyint has a value from range -127 to 127. Try using a smallint instead. -Original Message- From: mike karthauser [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 9:56 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Enlarging tables on 9/12/02 2:50 pm,

RE: [PHP-DB] Enlarging tables

2002-12-09 Thread Hutchins, Richard
Premature clickage... Or you could use a mediumint or int. Just check the mysql manual and select the int type that suits the size of your db best. -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED]] Sent: Monday, December 09, 2002 9:56 AM To: 'mike karthauser

RE: [PHP-DB] passing variables

2002-12-09 Thread Hutchins, Richard
Eddie, whenever I start having problems with variables, I drop this code in: begin code snip... ? // these lines format the output as HTML comments // and call dump_array repeatedly echo \n!-- BEGIN VARIABLE DUMP --\n\n; echo !-- BEGIN GET VARS --\n; echo !--

[PHP-DB] Dynamic Table Front End

2002-12-10 Thread Hutchins, Richard
List, I've been looking on and off for now for a class or plug-in or something that will allow an application user to define table specifications (#rows, #columns, spanning, etc) then allow them to enter table data (headers, body data, title, footer, etc.) in a graphical representation of the

RE: [PHP-DB] Re: flytte bsd harddisk til anden pc

2002-12-12 Thread Hutchins, Richard
I'm pretty sure the .dk on the end of his e-mail address means Denmark. Glad you guys were confused too. I was afraid that last shot of Tequila at the bar last night really screwed me up. -Original Message- From: Snijders, Mark [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 12,

RE: [PHP-DB] Selecting more than asked for

2002-12-13 Thread Hutchins, Richard
Try: SELECT some_column FROM some_table WHERE column_value IS NOT NULL AND unit_ID=$variable If that's kind of what you're looking for, there's good info in the MySQL manual about the WHERE condition and other sorting and selecting options. HTH -Original Message- From: Alex Francis

RE: [PHP-DB] random rows...what about tables

2002-12-17 Thread Hutchins, Richard
I think it's because mysql_list_tables returns a resource identifier ($result). You have to iterate through the resource identifier ($result) with a while() loop to get the actual table names out. From the PHP.NET site: ?php $dbname = 'mysql_dbname'; if (!mysql_connect('mysql_host',

RE: [PHP-DB] Inserting URL into table

2002-12-19 Thread Hutchins, Richard
Try addslashes($varname). Check PHP.NET for addslashes. -Original Message- From: George Pitcher [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 11:24 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Inserting URL into table Hi, I'm trying to insert a URL into a char

RE: [PHP-DB] trees in MySQL

2002-12-19 Thread Hutchins, Richard
Jose, In addition to any advice you may receive from your post today, check out the PHP archives. I distinctly remember a discussion related to these models maybe a month back that may be of interest to you. Don't remember if it dealt with your specific concerns, but I'm pretty sure it dealt with

RE: [PHP-DB] More linking problems but slightly OT

2002-12-19 Thread Hutchins, Richard
I think you're going to have to post some code for this one. If your database holds the exact data you're expecting, show the code that is building the link on your page after it is retrieved from the database. If the link in the database is wrong, show the query that inserts it into the database

RE: [PHP-DB] Users on line

2003-01-03 Thread Hutchins, Richard
How would the online table be maintained if a user simply closes out the browser without actually logging out properly? I'm not at all experienced with sessions, but closing the browser should terminate the session, correct? Bernain may want to delete from his online table every hour or so to

RE: [PHP-DB] Re: Is MySQL available from my host.

2003-01-03 Thread Hutchins, Richard
I know when I first started working with a host that provided MySQL support, there was a very specific path I had to use in the connection string because ...the MySQL server is behind a very strict firewall. If I didn't use the path exactly as their prototype indicated, I'd get errors like you

RE: [PHP-DB] Re: Is MySQL available from my host.

2003-01-03 Thread Hutchins, Richard
I'm pretty sure it is possible. Unless I'm wrong, PHP, by default, is compiled with MySQL support. So, what you're seeing could be a result of that default condition. Just because it's compiled with support for MySQL, doesn't necessarily mean that they will provide the database server. Please,

RE: [PHP-DB] preventing page from resubmitting when refreshing page

2003-01-09 Thread Hutchins, Richard
I use logic like this to avoid this problem: Submit data from form to a separate PHP script that handles the database submission then forwards to a results page which queries the database for the information from an ID passed along with the page forward. If you do this, when you refresh the

RE: [PHP-DB] Stumped...

2003-01-09 Thread Hutchins, Richard
Post your SQL statement. -Original Message- From: NIPP, SCOTT V (SBCSI) [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 1:37 PM To: '[EMAIL PROTECTED]' Subject: [PHP-DB] Stumped... I am getting an error that is proving very difficult to isolate and was

RE: [PHP-DB] PHP and mySQL help!

2003-01-10 Thread Hutchins, Richard
If you update $date and nothing else on the page, are any of the other values in the URL (HREF) set? You have two separate forms. $date is in one and $host is in the other. However, all of the other variables in your URL (HREF) are from the second form where $host is. My guess is that since you

RE: [PHP-DB] QUERY question (group by) - please help

2003-01-10 Thread Hutchins, Richard
Just a side note in case it's important, mysql_num_rows() is a PHP function, not a native MySQL function. Not being nitpicky, but it might be relevant if, for some reason, Damir cannot use PHP to obtain the number of rows. From the tone of the original post, it seems that might be a possibility.

RE: [PHP-DB] Undefined index and variables

2003-01-15 Thread Hutchins, Richard
It does not appear that you have posted the code from the add.php page in your original post (below). From the error messages you provided, that seems to be where the error is happening. You'll need to post the add.php code and identify line #23 for us to be able to help. -Original

RE: [PHP-DB] Re: Undefined index and variables

2003-01-15 Thread Hutchins, Richard
Fred, I don't have much time today, but here is my initial assessment of what might be going wrong with your page: You display add.php which draws a form for data. You submit that form to add.php (itself). The form redraws inside the page. You get errors when add.php looks for data in the

RE: [PHP-DB] ghost parse error?

2003-01-20 Thread Hutchins, Richard
Could you please identify which line of code is line 16? -Original Message- From: zmn [mailto:[EMAIL PROTECTED]] Sent: Monday, January 20, 2003 10:16 AM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] ghost parse error? Why in the first place do you break you php and start it over

RE: [PHP-DB] MySql DB, help, sql error and i don't know why

2003-01-21 Thread Hutchins, Richard
I'm pretty sure that the error is because you're not able to set a length for the TEXT column type. I checked the MySQL manual and it does not show a prototype with that optional parameter. Besides, if you want a TEXT of (255), why not just use a VARCHAR (255)? They're essentially the same thing

RE: [PHP-DB] using Flat File

2003-01-22 Thread Hutchins, Richard
What do you mean the code doesn't work? How is the code behaving? What kinds of errors are being returned by the interpreter? Is your register_globals set to ON or OFF? Are you certain you have access to the directory in which the file you wish to open is located? -Original Message-

RE: [PHP-DB] Getting values back out of a URL

2003-01-23 Thread Hutchins, Richard
When you go through the URL, you're using GET, not POST. ALl you really have to do is this: $parcel_query = SELECT * FROM land01_02_03 WHERE (PelNumber LIKE .$_GET[number].) AND (OnerName1 LIKE .$_GET[number].) ; Then you can drop the while loop that extracts the variables from the HTTP array.

RE: [PHP-DB] need help spotting this php parse error

2003-01-23 Thread Hutchins, Richard
Tell us specifically what the parse error is reporting to you and specifically what line is line 34. -Original Message- From: David Rice [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 2:53 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] need help spotting this php parse error

RE: [PHP-DB] need help spotting this php parse error

2003-01-23 Thread Hutchins, Richard
In your second e-mail you posted the error message, but failed to identify line 34. This is important so we can tell what code the parser is gagging on. Otherwise, it's going to take longer to get an answer because we're guessing which line is line 34. -Original Message- From: David

RE: [PHP-DB] function needed

2003-01-24 Thread Hutchins, Richard
Try searching www.phpclasses.org. I'm almost positive it's been written before and if it exists, this is a great place to start looking for it. -Original Message- From: Shahar Tal [mailto:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 12:45 PM To: [EMAIL PROTECTED] Subject:

RE: [PHP-DB] mysql_insert_id() vs. last_insert_id()

2003-01-28 Thread Hutchins, Richard
So I read this thread and the MySQL doc on mysql_insert_id() and still have a related question. Does mysql_insert_id() function on a per-connection basis? I read the stuff on last_insert_id() and it specifically mentions that the last ID is stored on the server on a per-connection basis. However,

RE: [PHP-DB] mysql_insert_id() vs. last_insert_id()

2003-01-29 Thread Hutchins, Richard
The one thing that jumps out at me is that if you insert multiple rows at the same time with an insert statement, LAST_INSERT_ID() returns the value for the first inserted row only, whereas MYSQL_INSERT_ID() returns the last id inserted. Am I reading that right? Yeah, that's the way I

RE: [PHP-DB] upload time out

2003-01-29 Thread Hutchins, Richard
Yeah, it's a configuration directive, check here: http://www.php.net/manual/en/configuration.directives.php#ini.upload-max-fil esize If you're moving 10MB, is it possible to use FTP instead? Don't know your situation. Just a suggestion. -Original Message- From: Ryan Holowaychuk

RE: [PHP-DB] PHP-WIN MYSQL Double results

2003-01-30 Thread Hutchins, Richard
Post your code. -Original Message- From: Chris Deam [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 30, 2003 2:27 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] PHP-WIN MYSQL Double results Please help: I am getting double results when loading an html/php page. I am not

RE: [PHP-DB] Re: PHP-WIN MYSQL Double results

2003-01-30 Thread Hutchins, Richard
Try this: After this line: $prcp = mysql_query($pquery); add this line: print_r($prcp); (For additional info: http://www.php.net/manual/en/function.print-r.php) What that should do is print the results directly from your query (which are stored as an associative array) before anything else is

RE: [PHP-DB] form field rejection

2003-02-03 Thread Hutchins, Richard
You could also look at a site like javascript.internet.com and look up a pre-written phone number validation script and do the validation on the client side in addition to or instead of doing it on the server side. One reason you may want to consider doing client-side validation for something

RE: [PHP-DB] Uploading an image then storing it in a MySQL blob field

2003-02-03 Thread Hutchins, Richard
Regardless of the final decision (directory vs BLOB) this topic is covered just about every week on this list. If you check the archives you'll find a wealth of information out there regarding uploading, storing and retrieving images and the benefits and disadvantages of each possibility. If

RE: [PHP-DB] date: reverse order

2003-02-04 Thread Hutchins, Richard
Simple MySQL. After your ORDER BY clause use either ASC (I think this is the default) or DESC. I'm pretty sure this'll work on date fields to produce the results you want. Your query will end up looking like: ...order by createdate DESC -Original Message- From: Addison Ellis

RE: [PHP-DB] Help!

2003-02-04 Thread Hutchins, Richard
Have you correctly updated you web server's .ini file to point to the PHP installation according to the PHP installation instructions? -Original Message- From: Tomas Liendo [mailto:[EMAIL PROTECTED]] Sent: Monday, February 03, 2003 10:29 PM To: [EMAIL PROTECTED] Subject: [PHP-DB]

RE: [PHP-DB] checking for empty array from a form field? grrrrrrrrrrr!

2003-02-05 Thread Hutchins, Richard
What about: count($arrayname) Should tell you how many items are in an array. -Original Message- From: Aaron Wolski [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 05, 2003 4:04 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] checking for empty array from a form field?

  1   2   3   >