RE: [PHP-DB] Passing multiple form variable in PHP

2002-11-12 Thread Hutchins, Richard
I'm pretty sure all you have to do is name your select as an array like so: Your selected values will come across as an array called $icon. If you need more info on this and how to use it, there's lots in the archives. That's where I found the info I needed. Good luck. Rich > -Original

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: Click Here The code for displaypage.php blah... " ?> Something like this should be all you'll need. A little more HTML here and there should help you position and size your image. Hope this helps. Rich > -Original Message- >

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 [mailto:toby@;uknetwe

RE: [PHP-DB] Multiply Auto_Increments

2002-11-13 Thread Hutchins, Richard
y I wasn't more specific the first time. Rich > -Original Message- > From: Toby Parkins [mailto:toby@;uknetweb.com] > Sent: Wednesday, November 13, 2002 2:16 PM > To: [EMAIL PROTECTED] > Subject: RE: [PHP-DB] Multiply Auto_Increments > > > Richard, > > H

Re: [PHP-DB] can i create an Access table or mdb with PHP?

2002-11-14 Thread Richard Allsebrook
niqid()...) and populate the copy. Send the copy to your user You will end up with copies littering your site, so at the start of the population phase, run some 'tidy up code' which deletes any old databases (older than a day say). Hope this helps. -- Richard Allsebrook Appli

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: 'A

RE: [PHP-DB] Email Encryption?

2002-11-15 Thread Hutchins, Richard
ot necessarily be the BEST solution, but I've seen 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] 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

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

2002-11-15 Thread Hutchins, Richard
d here. Everything SEEMS 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 > P

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

2002-11-15 Thread Hutchins, Richard
This is so 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. >

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

2002-11-15 Thread Hutchins, Richard
ee of four). > -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 F

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 al

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 as

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

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

2002-11-19 Thread Hutchins, Richard
Click="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

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'; 'Ry

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
ugh to accomplish (theoretically), but I've 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]] > Se

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

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 q

[PHP-DB] Getting a date from MS SQL in the correct format.

2001-04-02 Thread Richard Quadling
find it. Any suggestions. In the mean time, I've had to use DATEPART to pull the three bits in separately and add a bit to the PHP templates to add them all together. Ideally I want just the value as CCYYMMDD. Regards, Richard Quadling. -- PHP Database Mailing List (http://www.php.net

[PHP-DB] date_format for Oracle

2001-04-11 Thread Richard Crawford
This isn't strictly a PHP question, I suppose... but is anyone aware of a date_format function for Oracle comparable to MySQL's date_format() function? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: [PHP-DB] Record Update Link

2001-07-28 Thread Richard Chauvaux
There's a good tutorial that covers the subject of creating a list of contacts with hyperlinks to edit, delete etc. at: http://hotwired.lycos.com/webmonkey/programming/php/tutorials/tutorial4.html It was my first intro to PHP and was extremely helpful, although if I remember right a couple of t

Re: [PHP-DB] mssql_connect() commandline problem

2001-08-14 Thread Richard Chauvaux
Sounds like you might be working with 2 different versions of php: Mod-php for Apache in the web environment, stand-alone php operating in the shell. You might want to start by ensuring that the stand alone version is compiled -with mssql. Try running phpinfo() in the shell? Richard Erik

Re: SV: [PHP-DB] mssql_connect() commandline problem

2001-08-14 Thread Richard Chauvaux
s the Apache server and work within the shell environment. Richard Erik wrote: > I wrote a script () and executed it from the commandline > (php script.php > test.txt) > turns out text.txt doesnt have sybase support listed at all - which the > apache version of phpinfo has. > co

Re: [PHP-DB] Inseting info into MySQL and retrieving all in one SQL command

2001-08-19 Thread Richard Chauvaux
Take a look here and all will be revealed: http://www.mysql.com/doc/G/e/Getting_unique_ID.html basically, you need a field in the db with an auto_increment attribute. Richard CrossWalkCentral wrote: > Question how do you use this function? > > mysql_insert_id(); > > I have

[PHP-DB] Re: Sybase CT with/without Sybase ASE

2001-09-17 Thread Richard H
When you compile php with sybase ct you specify where the libs are: $SYBASE/lib, in ASE12.0 and above maybe the path differs from 11.9.2, I have not checked yet, will tomorrow. //dbaBert Carlo Borreo wrote: > Dear All, > In the past I had installed an Apache server with PHP 4.0.6 and Sybase CT

Re: [PHP-DB] ADORecordset Equivalent in PHP?

2001-10-23 Thread Richard Chauvaux
I would suggest checking out the classes at http://phpclasses.upperdesign.com/browse.html I've used the mysql_recordset class that is part of the mysql_db package. It has the basic methods similar to ADO. I found it to be very functional if you're using mysql. There are other classes there as w

Re: [PHP-DB] Help in passing multiple HTML form options to SQL query <-- Newbie

2001-10-27 Thread Richard Chauvaux
$country[0]'"; for ($n=1; count($country) > $n; $n++) { $sql.= " or ctry='$country[$n]'"; } richard TorrentUK wrote: > I am designing a ski web site and am presently trying to put together a > resort database. I started the search script tonight and am qui

Re: [PHP-DB] Using variables within a SELECT statement

2001-11-28 Thread Richard Crawford
nsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Sliante, Richard S. Crawford mailto:[EMAIL PROTECTED] http://www.mossroot.com AIM: Buffalo2K ICQ: 11646404 Yahoo!: rscrawford M

[PHP-DB] Mysterious Problem with database or PHP...

2001-11-28 Thread Richard Marriner
amming. Any insight would be greatly appreciated. You can take a look and see what I mean, http://205.171.74.8/testdb/ Thank You Richard Marriner [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EM

Re: [PHP-DB] onClick

2001-12-03 Thread Richard Crawford
Not directly, no. You can call a JavaScript function with the onClick command, but not a PHP function. But here's what I've done when I needed to do something like that. Create a separate page for the function, like function.php. Then in the anchor tag in your main page (call it index.php),

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 mysql>describe 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 > > > W

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:

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: 

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... \n\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n\n"; // dump_array() takes one array as a parameter // It iterates through

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

RE: [PHP-DB] MSSQL Text Length Restriction

2002-12-10 Thread Hutchins, Richard
Look at the tinyblob (tinytext), mediumblob (mediumtext), blob (text), longblob (longtext) column types in the MySQL manual. Storage-wise they don't look too terribly inefficient. -Original Message- From: Adam Voigt [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 10:18 AM To: [

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: In the example above, I think the output would just be one table name. Howev

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

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 catch

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 ha

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

2003-01-03 Thread Hutchins, Richard
- > From: Robert Wagner [mailto:[EMAIL PROTECTED]] > Sent: Friday, January 03, 2003 4:48 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Re: Is MySQL available from my host. > > > Richard: > Thanks for your rapid reply. What their tech support is saying is > >>

RE: [PHP-DB] Re: Flat File Upload..HELP!

2003-01-06 Thread Richard Allinson
Check your files size resriction. It seems the file is not even leaving the client. 1000 = 1K Ric J . Keith Tew wrote: >> >> >> I know this is not technically a DB question but thought someone may >> be able to help with this. I have tried everything I could think of >> to make this

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 resul

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 >

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 ha

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

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 $HTTP_P

RE: [PHP-DB] Slashed being added..

2003-01-15 Thread Richard Allinson
stripcslashes (string str) Ric -Original Message- From: Aaron Wolski [mailto:[EMAIL PROTECTED]] Sent: 15 January 2003 16:38 To: [EMAIL PROTECTED] Subject: [PHP-DB] Slashed being added.. Hi All.. Quick q here as I cannot remember how to prevent this. Customer is entering their name

RE: [PHP-DB] Concatenate two strings

2003-01-16 Thread Richard Allinson
Mine is as follows $valor = $valor1.$valor2; or $valor = "$valor1$valor2"; -Original Message- From: Fred Wright [mailto:[EMAIL PROTECTED]] Sent: 16 January 2003 11:54 To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Concatenate two strings On mine its just $valor1$valor2 "Mark Snijders" <[

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

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 an

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

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 HTT

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 e

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 Ri

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

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

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

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

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 like

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 you'v

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

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? > gr

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

2003-02-05 Thread Hutchins, Richard
ilto:[EMAIL PROTECTED]] > Sent: Wednesday, February 05, 2003 4:53 PM > To: 'Hutchins, Richard'; [EMAIL PROTECTED] > Subject: RE: [PHP-DB] checking for empty array from a form field? > grrr! > > > Ok... well > > When I select the "select product" whi

RE: [PHP-DB] collaborating on a document

2003-02-11 Thread Hutchins, Richard
1. This question has nothing to do with PHP or databases. 2. Adobe already thought of it: Adobe Acrobat 5.0. > -Original Message- > From: Baumgartner Jeffrey [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 11, 2003 10:13 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] collaborating on

RE: [PHP-DB] collaborating on a document

2003-02-11 Thread Hutchins, Richard
pdating in real time (and completely wouldn't work), I would say, yes, two frames should work, but you might even want a third (hidden) at the bottom that never stops executing, just pulling entry's out when new ones are added, and use javascript to add them to the right frames with

RE: [PHP-DB] Post without user hitting submit button

2003-02-12 Thread Hutchins, Richard
If I understood your question, you can use a JavaScript to take care of the submission for you. Hitting Submit is a client side action, so you have to handle it in the browser instead of on the server with PHP. Maybe something like checking to make sure all fields are valid with an onBlur() script.

RE: [PHP-DB] [Import text file]

2003-02-13 Thread Hutchins, Richard
A quick trip through the MySQL manual hints that you may have to use forward slashes in your path on a windows system. So... LOAD DATA LOCAL INFILE 'C:/WINDOWS/TEMP/phpC255.TMP' INTO TABLE abonnes FIELDS TERMINATED BY ';' ESCAPED BY '\\' LINES TERMINATED BY '\r\n' (dp_indpri,dp_nom,dp_ville) .

FW: [PHP-DB] [Import text file]

2003-02-13 Thread Hutchins, Richard
Just forwarding this on to the general list as it was only sent directly to me. -Original Message- From: karthikeyan.balasubramanian [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 13, 2003 9:03 AM To: Hutchins, Richard Subject: Re: [PHP-DB] [Import text file] try using something

RE: [PHP-DB] Simple PHP Script

2003-02-13 Thread Hutchins, Richard
Try referring to your variables as: $_POST['submit1'] and $_POST['vname'] Then check our register_globals on php.net to find out why. I'm pretty sure that's what the problem is. > -Original Message- > From: Poon, Kelvin (Infomart) [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 1

RE: [PHP-DB] TimeStamp format to date

2003-02-20 Thread Hutchins, Richard
> > Cumprimentos > > What'd you call me? Sometimes it's the simple things that make you laugh the hardest. Thanks, John. > -Original Message- > From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 20, 2003 10:37 AM > To: Bruno Pereira; [EMAIL PROTECTED] > Subjec

RE: [PHP-DB] TimeStamp format to date

2003-02-20 Thread Hutchins, Richard
Dude, you just topped John! That was laugh-out-loud hilarious. Sorry this has gotten off-topic, but c'mon. A "freshmaker"? Classic, just classic. Rich > -Original Message- > From: Mark [mailto:[EMAIL PROTECTED]] > Sent: Thursday, February 20, 2003 12:09 PM > To: [EMAIL PROTECTED] > Subjec

RE: [PHP-DB] Update errors

2003-02-27 Thread Hutchins, Richard
Remove the comma at the end of this line: > cat_name = '$cat_name',//remove this comma > -Original Message- > From: Alawi shekh albaity [mailto:[EMAIL PROTECTED] > Sent: Saturday, March 01, 2003 1:27 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Update errors > > > What wrong with this

RE: [PHP-DB] Storing an array in the database

2003-02-28 Thread Hutchins, Richard
You could store it as a series of comma separated values in a text field and manipulate it using implode() and explode() on the comma separators. I've done this for small arrays and it works OK. WOuld like to know if there's an easier way though. Not that this is all that bad. I'm just lazy. ;^) H

RE: [PHP-DB] Code to send user info to database

2003-02-28 Thread Hutchins, Richard
Michelle, You said you've tried tutorial after tutorial. What specific problems are you having? What kind of database are you using? Have you architected the db yet? We can't help much if we don't know what specific problems you're having (e.g. db connection problems, PHP parse errors, unexpected

RE: [PHP-DB] Unknown() error

2003-02-28 Thread Hutchins, Richard
Just a guess, but do you have a variable (global variable) named $15 someplace? If you do, PHP does not allow variable names that start with numbers. > -Original Message- > From: AP Fritts [mailto:[EMAIL PROTECTED] > Sent: Friday, February 28, 2003 3:51 PM > To: [EMAIL PROTECTED] > Subject

RE: [PHP-DB] Customer id

2003-02-28 Thread Hutchins, Richard
You need to create a column in the target table similar to: custID SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT When you run your INSERT query, you pass NULL to that column and the ID will be created/auto incremented for you. Is that what you mean? Rich > -Original Message- > From: D

RE: [PHP-DB] Help with MySQL Logic

2003-03-03 Thread Hutchins, Richard
Coming from a non-programmer... If you were to take the cars' IDs and put them in an array named for the track a specific group of cars is on, that would give you indexes, thus positions, from 0-N depending on how many cars are there. Any time you have to add or delete cars, you should be able to

RE: [PHP-DB] date functions

2003-03-04 Thread Hutchins, Richard
Good stuff here. http://www.mysql.com/doc/en/Date_and_time_functions.html Check out the SELECT DATE_ADD section. That might be what you're looking for. HTH, Rich > -Original Message- > From: David Rice [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 04, 2003 9:36 AM > To: [EMAIL PROTEC

[PHP-DB] Serialize...Unserialize

2003-03-04 Thread Hutchins, Richard
I have an array of values I want to store in a MySQL db in a column called readBy of type TEXT. I want to take that array and serialize it then insert it into the db. No big deal. When I query the db and get the value from the readBy column, I know I have to unserialize it. Again, no big deal. My

RE: [PHP-DB] Serialize...Unserialize

2003-03-04 Thread Hutchins, Richard
the comparisons I need to do inside other queries. Which I don't mind, I was just hoping serialize()/unserialize() would make life easier. Lesson learned. Thanks, Rich > -Original Message- > From: Gerard Samuel [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 04, 2003 1:39

[PHP-DB] Populate Array During Loop With in_array

2003-03-06 Thread Hutchins, Richard
Can somebody please tell me why the $displayThese variable in the code snippet below only gets populated with the last value in the $newsList array even when $newsList has more than one row of data? while($newsList = mysql_fetch_array($result_getNews)){ if(

RE: [PHP-DB] Populate Array During Loop With in_array

2003-03-06 Thread Hutchins, Richard
essage- > From: Rich Gray [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 06, 2003 10:05 AM > To: Hutchins, Richard; [EMAIL PROTECTED] > Subject: RE: [PHP-DB] Populate Array During Loop With in_array > > > > Can somebody please tell me why the $displayThese variable

RE: [PHP-DB] Populate Array During Loop With in_array

2003-03-06 Thread Hutchins, Richard
These[] = $newsList["newsID"]; } } Rich > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 06, 2003 11:36 AM > To: Hutchins, Richard > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP-DB]

RE: [PHP-DB] Populate Array During Loop With in_array - FIXED

2003-03-06 Thread Hutchins, Richard
Really have to apologize. I tested the previous code too hastily before I posted it, and additional testing after I posted it proved that it broke with multiple items marked as read. Here is the fixed code. Hopefully I've plugged the holes. Sorry for any inconvenience to anybody actually paying att

RE: [PHP-DB] How to page results?

2003-03-06 Thread Hutchins, Richard
Mike, If you check www.phpclasses.org, and search for "paging" there's a paging class built by pierre-yves lemaire that might do just what you're looking for. It's pretty highly rated by the users of the site. I also know this question has been asked in the past so a stroll through the archives m

<    1   2   3   4   5   6   >