[PHP-DB] Date operations.

2002-01-28 Thread Garry Optland
Hi All, I have a problem working out a suitable algorithm either in PHP or MySQL. Basically I have a DB that keeps track of breeding records. Each record has a paired data, and a split-up date. I need to generate some statistics to work out average numbers of pairs per month, averaged on a

Re: [PHP-DB] Re: Moving from MySQL to MSSQL Server 2000

2002-01-28 Thread Manuel Lemos
Hello, Boaz Yahav wrote: > > Fail Over is not for when the cluster is too busy, it's for when the > server dies, or when someone killed it's power, or when you loose your > network, or when you get a blue screen (assuming you are on windows :). Ok, it is the same. When the server is dead, the r

Re: [PHP-DB] Re: Moving from MySQL to MSSQL Server 2000

2002-01-28 Thread Manuel Lemos
Hello, Boaz Yahav wrote: > > I don't think you realize the nature of the site. Its an auction site > and not a retail site. > Prices need to be updated on thousands of clients simultaneously. Our > goal is to > refresh the data on the client every 3-10 seconds while having 1500 > online open > a

[PHP-DB] RE: ensuring unique field value in MySQL using PHP

2002-01-28 Thread Adam Royle
Checking a small database for username/password combination would happen so quick, it would be nearly impossible for two usernames to be entered in. Your script should work properly, but to make sure no duplicates are entered, you can change the column definition using the "ALTER columnName" comma

[PHP-DB] ensuring unique field value in MySQL using PHP

2002-01-28 Thread Janet Valade
I have a form in which users create their own login name. The code for storing the login name they created does something like the following: $userlogin is the name the user typed in the form $sql = "select loginname from login where loginname='$userlogin'"; $result=mysql_query($sql); $num=mysql_

Re: [PHP-DB] How to upload image?

2002-01-28 Thread David Sullivan
For the form, use and as for handling where the file get saved on the server-side, see: http://www.php.net/manual/en/features.file-upload.php On January 28, 2002 05:04 pm, you wrote: > Hi there everyone, > > I'm writing an update utility for a database system, but I need to give the > user the

[PHP-DB] How to upload image?

2002-01-28 Thread Chris Payne
Hi there everyone, I'm writing an update utility for a database system, but I need to give the user the option to select a file from their machine to upload to the server (Not to the DB itself, but an images dir), what is the best way of doing this in PHP so that it brings up a file requestor

RE: [PHP-DB] storing and retrieving arrays in mysql

2002-01-28 Thread Peter Adams \(IKN\)
I've been working on something like this since about September/October. It's not too hard, but it did take more coding than I thought it would. Now, there's a couple of ways you could do this. I chose the cheap (in terms of the number of DB tables) way out. The way I have it set up is this. You

Re: [PHP-DB] storing and retrieving arrays in mysql

2002-01-28 Thread olinux
I've done something similar by building a multidimensional array of categories and subcats in one query and then Loop thru this with a for each to build the category structure. Categories table looks like this CatID | ParentID | CategoryName Array is $category_menu[$ParentID][$CatID] I'm sure

[PHP-DB] storing and retrieving arrays in mysql

2002-01-28 Thread Corey Eiseman
Hi folks, I've got a question hopefully someone can shed some light on for me. I'm building an online store for a client, and one of the things he wants is to organize his products into categories and subcategories.. not so unusual, but the kicker is he wants to be able to associate a subcategory

[PHP-DB] Date function

2002-01-28 Thread Sridhar Moparthy
Hi All, Is there any function in PHP4.X or in Oracle8i to calculate number of Business days ( excluding Saturday and Sunday) between two given dates? Thanks in advance. Sridhar. -Original Message- From: qartis [mailto:[EMAIL PROTECTED]] Sent: Monday, January 28, 2002 1:38 PM To: [EMAIL

[PHP-DB] Re: uploading

2002-01-28 Thread Thomas \"omega\" Henning
thanks alot it helped "Thomas "Omega" Henning" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello how can i upload something from my hdd to the webserver using php? > > note: don't have ftp on the machine!! > > Thanks > > Thomas "omega" Henning > > -- PHP

[PHP-DB] Re: [PHP] File uploading like hotmail

2002-01-28 Thread qartis
I think you might be looking for HTML form element. "Duky Yuen" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I want to make something like when you are attaching something to an > email in hotmail. I want to make something that searches your own > computer

RE: [PHP-DB] Re: [PHP] PHP and MYSQL Security`

2002-01-28 Thread Peter Adams \(IKN\)
> >If this file has a .php extension remote users will not have > access to > >the variables because the file is parsed by php and they > never see the > >actual file contents when requesting the document via the > web. If you > >are concerned with users on localhost having access to the >

RE: [PHP-DB] [PHP] PHP and MYSQL Security`

2002-01-28 Thread Peter Adams \(IKN\)
I've figured out a fairly secure program structure. Here's one option (I'm sure there's as many ways to accomplish similar security as there are people on this list): First, a little info about the environment. It's a Linux OS running Apache Web Server. Multi-user environment providing hosting

Re: [PHP-DB] UPDATE query to add to a field

2002-01-28 Thread DL Neil
Hello Adv. Systems Design, > I need to be able to update a field in MySQL, the catch is that I have to add on to >text that is already there and I have to be able to do it within MySQL (phpMyAdmin). My first idea was to do: > > SET prod_desc = prod_desc + "more info to tack on to end" > > but th

Re: [PHP-DB] UPDATE query to add to a field

2002-01-28 Thread Joffrey van Wageningen
> SET prod_desc = prod_desc + "more info to tack on to end" > > but this is a mathematical function which returns 0! update table set field = concat(field, "more info") where id = 1; find the string functions in the mysql manual... with kind regards, Joffrey van Wageningen -- PHP Database M

Re: [PHP-DB] UPDATE query to add to a field

2002-01-28 Thread Paul DuBois
At 9:06 -0800 1/28/02, Adv. Systems Design wrote: >hello all: > >I need to be able to update a field in MySQL, the catch is that I >have to add on to text that is already there and I have to be able >to do it within MySQL (phpMyAdmin). My first idea was to do: > >SET prod_desc = prod_desc + "mor

[PHP-DB] UPDATE query to add to a field

2002-01-28 Thread Adv. Systems Design
hello all: I need to be able to update a field in MySQL, the catch is that I have to add on to text that is already there and I have to be able to do it within MySQL (phpMyAdmin). My first idea was to do: SET prod_desc = prod_desc + "more info to tack on to end" but this is a mathematical f

Re: [PHP-DB] session_registered variable problem

2002-01-28 Thread Jason Wong
On Tuesday 29 January 2002 00:24, Markus Lervik wrote: > On Monday 28 January 2002 18:06, Jason Wong wrote: > $page behaves just fine : [snip] > page: 2 <- yup, it's incrementing, all right... > nr_pages: 230 > > Whack! Doesn't work any more... It's starting to drive me mad. Me too. Post the

Re: [PHP-DB] session_registered variable problem

2002-01-28 Thread Markus Lervik
On Monday 28 January 2002 18:06, Jason Wong wrote: > > Besides, I have a strange fetisch to do everything the hard way. : ) > Masochist :) :D > Anyway, as per the subject, how are you getting $page? I assume it is > stored in the session. Is $page behaving correctly when you go from one > page

Re: [PHP-DB] session_registered variable problem

2002-01-28 Thread Jason Wong
On Monday 28 January 2002 23:45, Markus Lervik wrote: > Well, in this particular case it won't work at all, because the SQL-query > is dynamically created based on what the user wants to search for. It > doesn't nessecary include all columns. The only static bit of the query is > "FROM uusi_lehti

Re: [PHP-DB] session_registered variable problem

2002-01-28 Thread Markus Lervik
On Monday 28 January 2002 17:34, Jason Wong wrote: > > Crikey, it looks terribly complicated for what looks like something to page > through a set of results. > > Wouldn't it be easier to do away with the ereg_replace()? > > if($go=="next") { >if($page < $nr_pages && $page >= 0) { > $pa

Re: [PHP-DB] session_registered variable problem

2002-01-28 Thread Jason Wong
On Monday 28 January 2002 21:05, Markus Lervik wrote: > On Monday 28 January 2002 14:57, Jason Wong wrote: > > > Somehow when I print the value of $query, it looks fine. > > > Then, when I change $query a bit and print it again, > > > it looks fine. > > > Change it a third time, and it suddenly ge

RE: [PHP-DB] [PHP] PHP and MYSQL Security`

2002-01-28 Thread Special Design Services Inc.
What I do, because I am using a test platform is to put the line with pconnect() in a small text file, place this file somewhere on the disk, outside of the web site root and refer to that file with include() in my code. This way, even if the PHP source code were compromised, the user name and

[PHP-DB] Re: Another dynamic sql.

2002-01-28 Thread Lerp
Your select options have no values associated with them! Not sure if you did this on purpose or not, but no value will be sent to next page. Joe :) "Raymond Lilleodegard" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi all! > > I have this form with some c

[PHP-DB] Re: [PHP]please help

2002-01-28 Thread Lerp
Hi there, here's an upload form that might be what u are looking for: Hope his helps you out :) Joe php page 1 Upload Photo: php page 2 -- receiving/upload processing page "; print $userfile_name . ""; // copy the file being posted if(copy($userfile, "/ez/codesnipits/temprotatingimages/"

[PHP-DB] mySQL 4.0.2-alpha

2002-01-28 Thread Paul Stevens
Hi guys, I'm running mySQL 3.23.43 at the mo' with PHP-GTK 0.5.0. Long and the short of the matter is, anyone running mySQL 4.0.2-alpha in anywhere near a production environment yet, and if so, how is it? My server is a Win2K Server SP2 box...so how steady are those windows binaries??? :-) --

Re: [PHP-DB] session_registered variable problem

2002-01-28 Thread Markus Lervik
On Monday 28 January 2002 14:57, Jason Wong wrote: > > Somehow when I print the value of $query, it looks fine. > > Then, when I change $query a bit and print it again, > > it looks fine. > > Change it a third time, and it suddenly gets the value it > > had in the beginning. > Could you post som

RE: [PHP-DB] mysql_insert_id - link_identifier

2002-01-28 Thread B. Verbeek
Thanks Jason, That was the answer I was looking for! It works like you suggested!! Thanks regards, bart -Oorspronkelijk bericht- Van: Jason Wong [mailto:[EMAIL PROTECTED]] Verzonden: maandag 28 januari 2002 13:52 Aan: [EMAIL PROTECTED] Onderwerp: Re: [PHP-DB] mysql_insert_id - link_ide

Re: [PHP-DB] session_registered variable problem

2002-01-28 Thread Jason Wong
On Monday 28 January 2002 20:45, Markus Lervik wrote: > Hello! > > I have a problem with session_registered variables. > It seems that my sessions behave quite erratic. Well, > actually just one variable, $query. > > Somehow when I print the value of $query, it looks fine. > Then, when I change $q

Re: [PHP-DB] mysql_insert_id - link_identifier

2002-01-28 Thread Jason Wong
On Monday 28 January 2002 20:18, B. Verbeek wrote: > I already run the query without the value of the primary-key field: > > $q_orders_id2 = "INSERT INTO orders(orders_datum, orders_sessid)"; > $q_orders_id2.= " VALUES ('$date', '$sid')"; > $r_orders_id2 = mysql_query($q_orders_id2, $sqllink

[PHP-DB] session_registered variable problem

2002-01-28 Thread Markus Lervik
Hello! I have a problem with session_registered variables. It seems that my sessions behave quite erratic. Well, actually just one variable, $query. Somehow when I print the value of $query, it looks fine. Then, when I change $query a bit and print it again, it looks fine. Change it a third

[PHP-DB] mysql_insert_id - link_identifier

2002-01-28 Thread B. Verbeek
I already run the query without the value of the primary-key field: >> $q_orders_id2 = "INSERT INTO orders(orders_datum, orders_sessid)"; $q_orders_id2.= " VALUES ('$date', '$sid')"; $r_orders_id2 = mysql_query($q_orders_id2, $sqllink_id); $orders_id = mysql_insert_id($sqllink_id); << T

[PHP-DB] mysql_insert_id - link_identifier

2002-01-28 Thread B. Verbeek
Hello, How do I use the linkidentifier to get me the last_inserted_id (mysql_insert_id) from a auto_increment-colomn? Do I use: >> $q_orders_id2 = "INSERT INTO orders(orders_datum, orders_sessid)"; $q_orders_id2.= " VALUES ('$date', '$sid')"; $r_orders_id2 = mysql_query($q_orders_id2, $sql