[PHP-DB] php.exe Application Error

2002-11-12 Thread Radovan Radic
Hi all, I have tried this in php.windows, no answers there and since this is kind of db question i will try here. IIS Win2000, MSSQL 7, PHP 4.2.3 I have script that reads about 100-200 rows in the SELECT list and it is ok. After that, i have robust sql query for select some data from 4-5

[PHP-DB] Re: php.exe Application Error

2002-11-12 Thread Radovan Radic
Radovan Radic [EMAIL PROTECTED] wrote in message news:20021112093111.53801.qmail;pb1.pair.com... Hi all, I have tried this in php.windows, no answers there and since this is kind of db question i will try here. IIS Win2000, MSSQL 7, PHP 4.2.3 I have script that reads about 100-200 rows in

[PHP-DB] Re: [PHP-WIN] update tablename

2002-11-12 Thread Ignatius Reilly
You can not do it directly. You have to create a new table as a copy of the old one: CREATE TABLE new_table SELECT * FROM old_table Your problem will be that the MySQL PHP user will probably not have the CREATE rights. Ignatius Rodrigo San Martin

Re: [PHP-DB] Access a Flat File DB - How?

2002-11-12 Thread Maxim Maletsky
Risks are to share properly the data. You can never rely on the accuracy of data in the flat files as those could be changing at the same instance as your application is reading it. RDMS (not mySQL) can handle it under relational logic mechanisms, meaning they would not read the data that is

[PHP-DB] array sorting

2002-11-12 Thread Martin Allan Jensen
Hi everyone... I got a bit longer now.. But i have some trouble sorting my arrays I get this array returned. Array ( [0] = Array ( [0] = 10 [1] = 40 [2] = 50 [3] = 80 [4] = 130 [5] = 220 [6] = 320 ) [1] = Array ( [0] = 10 [1] = 40 [2] = 50 [3] = 80 [4] = 130 [5] = 220 [6] = 320 [7]

Re: [PHP-DB] array sorting

2002-11-12 Thread Ignatius Reilly
Just loop through the first index, then search on the second index: while ( list( $key, $value ) = each( $my_arr ) ) { // now $value is your ( [0] = 10 [1] = 40 [2] = 50 [3] = 80 [4] = 130 [5] = 220 [6] = 320 ) array // sort your array by values sort( $value ) ; // get the last

[PHP-DB] session in php 4.2.3

2002-11-12 Thread dn
Hi! I have to support a PHP-Database-solution which someone else has developed. In addition I'm quite new to php ... It uses Oracle 8 to display values out of the database. Everything is running fine with php 4.1.1. Due to security reasons I wanted to update to php 4.2.3. I use the same values

Re: [PHP-DB] session in php 4.2.3

2002-11-12 Thread Jeffrey_N_Dyke
are you stating the session on on the other pages with session_start()? what errors are you getting? if you check for session_is_registered (user) on the other pages, what do you get? can you send some code along, its hard to see what the issue may be without it.

Re: [PHP-DB] session in php 4.2.3

2002-11-12 Thread dn
Hi! Jeffrey N Dyke schrieb: are you stating the session on on the other pages with session_start()? Yes I do! Code comes along! anmelden.php does a successful db-login (db-logfile confirms that). content.php runs into: Warning: OCISessionBegin: ORA-01017: invalid username/password; logon

Re: [PHP-DB] session in php 4.2.3

2002-11-12 Thread Leif K-Brooks
My guess is a register_globals problem, but it's hard to tell without seeing your scripts. dn wrote: Hi! I have to support a PHP-Database-solution which someone else has developed. In addition I'm quite new to php ... It uses Oracle 8 to display values out of the database. Everything is

[PHP-DB] date questions in mySql

2002-11-12 Thread Paul Ihrig
ok i can parse a date from mySql date field so it displays as: 08/06/1972 but if i insert it into the field in this format then the date gets hosed. do i have to insert as -mm-dd can i have a form field that has mm/dd/ but then change it on insert? how would i do this? thanks. -paul

Re: [PHP-DB] date questions in mySql

2002-11-12 Thread Jeffrey_N_Dyke
check out the date( ) function in mysql. a quick prelude of it is.select date(date_col, %m/%d/%Y) from table...this will take -mm-dd and return mm/dd/

[PHP-DB] Dynamic MySql Update Query

2002-11-12 Thread David Rice
Okay this is a tough one. I want to make a dynamic mysql update query that takes results entered into a series of text boxes (changes from page to page) and then updates that record in my Mysql table. the name of the form fields are $value[$x] where 1 = $x = Total number of fields

[PHP-DB] sql select

2002-11-12 Thread Steve Dodkins
if i have a statement $result = mysql_query(SELECT labor_id,labor_ord_no,labor_wkyr,works_orders_part_no,works_orders_qty,works _orders_customer_id,labor_qty,labor_time,labor_qty*parts_time+parts_setup AS timea FROM labor,works_orders,parts WHERE labor_ord_no=works_orders_ord_no AND

Re: [PHP-DB] session in php 4.2.3

2002-11-12 Thread dn
Hi! Leif K-Brooks schrieb: My guess is a register_globals problem, but it's hard to tell without seeing your scripts. That did the trick! Thank you very much! I did not provide a path to php.ini so the setting was first not read! Now it works! Best regards Daniel -- PHP Database Mailing

RE: [PHP-DB] sql select

2002-11-12 Thread Edward Peloke
I don't think you can reference the aliased column timea in the select clause, I know sql server won't let you do it..try and (labor_qty*parts_time+parts_setup)labor_time -Original Message- From: Steve Dodkins [mailto:Steve.Dodkins;ebm-ziehl.co.uk] Sent: Tuesday, November 12, 2002 10:16

Re: [PHP-DB] sql select

2002-11-12 Thread Adam Williams
Have you ran it by hand in MySQL from the command prompt with some test data and gotten an error? Adam On Tue, 12 Nov 2002, Steve Dodkins wrote: if i have a statement $result = mysql_query(SELECT

[PHP-DB] Passing multiple form variable in PHP

2002-11-12 Thread Stephen Rhodes
HELLO - this is probably a simple problem !! Wanting to use select multiple ... in a html form and pass multiple value into a php variable but does not work. I only get a single value. Can you tell me what I am doing wrong ? Does the multiple value get passed correctly in php if

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

2002-11-12 Thread Ford, Mike [LSS]
-Original Message- From: Stephen Rhodes [mailto:stephen.rhodes;scils.co.uk] Sent: 12 November 2002 16:32 Wanting to use select multiple ... in a html form and pass multiple value into a php variable but does not work. I only get a single value. Can you tell me what I am doing

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

2002-11-12 Thread Jeffrey_N_Dyke
using the [] makes your variable an array when it comes into php. **snip** else { print 'form name=sqlform method=post action=test.php?task=check font class=look2Multiple Check:/font select multiple name=icon[] option value=falseFalse/option option value=trueTrue/option

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

2002-11-12 Thread Stephen Rhodes
Cheers - query Answered Stephen Rhodes [EMAIL PROTECTED] wrote in message news:20021112162930.65021.qmail;pb1.pair.com... HELLO - this is probably a simple problem !! Wanting to use select multiple ... in a html form and pass multiple value into a php variable but does not work. I only

[PHP-DB] SQLyog 2.51 - the definitve FREE Windows front-end to MySQL

2002-11-12 Thread Karam Chand
Greetings SQLyog v2.51. The definitive Windows Front End for MySQL. SQLyog is FREE! Some of the new features added in SQLyog 2.51 are - -- Alter Table structure in an easy to use Grid mode. -- Optimized for speed and network resources. -- Insert / Update data in a table. -- Insert / Update

RE: [PHP-DB] sql select

2002-11-12 Thread Steve Dodkins
Top man!! Many thanks Steve -Original Message- From: [EMAIL PROTECTED] [mailto:epeloke;echoman.com] Sent: 12 November 2002 16:02 To: Php-Db (E-mail) Subject: RE: [PHP-DB] sql select I don't think you can reference the aliased column timea in the select clause, I know sql server won't

[PHP-DB] payperiods

2002-11-12 Thread Darren Bentley
Hello, I have build a php calendar and want to implement 2 week payperiods so staff can enter their hours worked. Then I can summarize work done per pay period. Any idea what the easiest way to do this is? I could hard code a starting date into a database, then go up 2 weeks at a time from

Re: [PHP-DB] payperiods

2002-11-12 Thread Peter Beckman
$nextpayperiod = mktime(0,0,0,$month,$day+14,$year); $humanreadabledate = date(r,$nextpayperiod); where $month is numeric month, $day is the last payperiod day (1-31), and $year is the year of the payperiod. $nextpayperiod will equal the unix timestamp of 14 days from the last payperiod. Peter

RE: [PHP-DB] payperiods

2002-11-12 Thread Anderson, Jerrad
I would think that the hard coded date is the way I'd do that. maybe not neccessarily a start_dt, but maybe a pay_pd_st date. This date is just the date the payperiod falls on. You increment it once every two weeks. Have a table in your db with that field and variable. maybe hardcode the very

[PHP-DB] MySql Update.

2002-11-12 Thread David Rice
Making an update query that adapts to the number of fields that are to be updated Is there anyway to do like a for loop to create the values part of the query then combine it with the first part of the string. something like what i have below... although something that works correctly as

Re: [PHP-DB] MySql Update.

2002-11-12 Thread Adam Voigt
$query = UPDATE tablename SET ; foreach($_POST AS $key = $value) $query .= $key = '$value',; $query[strlen($query)-1] = ; $query .= WHERE id = '$_GET[id]'; Or something? On Tue, 2002-11-12 at 13:58, David Rice wrote: Making an update query that adapts to the number of fields that

Re: [PHP-DB] MySql Update.

2002-11-12 Thread Marco Tabini
How about: function do_query ($table, $fields, $where) { $sql = 'update ' . $table . ' Set '; foreach ($fields as $k=$v) $sql = $k . ' = \'' . $v . '\','; return mysql_query ($sql); } Not sure if it adapts 100% to your case but you can probably fix it

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

2002-11-12 Thread Darren Bentley
Our payperiods will always be 2 week increments. So if I specify a starting day in the database I need to have that starting day always updated to the current starting day. (when we switch to the new payperiod), so as Jerrad mentioned I could use a cron job. But how would I be able to look at

RE: [PHP-DB] payperiods

2002-11-12 Thread Peter Beckman
Put the dates for employees into one table. In another, put the payperiods. You could populate the payperiods table for the next 90 years if you wanted if it is always on a 2 week schedule. To look at past payperiods: select start, end from payperiods where start = '$querydate'; Or just

RE: [PHP-DB] payperiods

2002-11-12 Thread Darren Bentley
Ok, that makes sense. I have all the payperiods specified in a table to begin with, then just query selecting all = start = end. Thanks, - Darren On Tue, 2002-11-12 at 11:29, Peter Beckman wrote: Put the dates for employees into one table. In another, put the payperiods. You could

[PHP-DB] OT... distribution under the GPL

2002-11-12 Thread Michael Cortes
This is probably off topic..I hope someone can help. How do I go about distributing a php program (collection, scripts, whatever) under the GPL? Thank you for any help you may give in pointing me in the right direction. M.Cortes Fort LeBoeuf School District -- PHP Database Mailing

[PHP-DB] How to do this..

2002-11-12 Thread Aaron Wolski
Hi All, Need a little help with something. I've created a Search Engine Tracking tool that allows me to measure ROI from users that comes form search engines using specific keywords.. My problem is I forgot to capture a multiple of different identifies that tell me where the keyword is. To

Re: [PHP-DB] How to do this..

2002-11-12 Thread Jeffrey_N_Dyke
put it inside a preg_split where you say that [?KR] in the brackets are the possible identifiers, and the brackets are required. that should work. i.e $chunks = preg_split( /[?KR]/, $string[query]); THis would also work with split. Something like that might work for ya hth Jeff

Re: [PHP-DB] OT... distribution under the GPL

2002-11-12 Thread Peter Beckman
SourceForge.net and freshmeat.net both offer Free hosting of Open-source, GPL software. SF.net also offers CVS services for keeping revisions centralized. Both offer the ability to host tarballs of your collections, scripts and other useful stuff. I know on SF.net you can create one project

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

2002-11-12 Thread Brett Lathrope
I have several thumbnail images spread out in my website. I thought it would be cool to write a single PHP script so that when they click on the thumbnail, the name of the larger pic would be passed to a PHP script that displays it on its own page...I don't even care about a link back, they can

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

[PHP-DB] Variable from PHP to HTML...

2002-11-12 Thread NIPP, SCOTT V (SBCSI)
I am attempting to create a form of system names that is populated from a database query. The database query is working fine, and the form population is actually working fine also. The question I have is about organizing the variables that result from the form. I want to use the system

Re: [PHP-DB] Variable from PHP to HTML...

2002-11-12 Thread Lisi
form name=form1 method=post action= table border=0 align=center ?php do { $sys = $system['Name']; if ($cnt == 1) { $cnt = 2; echo tr; ? td width=161input name=$sys type=checkbox value=name ?php echo $sys; ?/td Your input box should be the following: input

Re: [PHP-DB] Access a Flat File DB - How?

2002-11-12 Thread Crony
On another topic...Does MySQL handle record locking and prevent multiple open edits by different users? Maxim Maletsky [EMAIL PROTECTED] wrote in message news:20021112130532.1DE5.MAXIM;php.net... Risks are to share properly the data. You can never rely on the accuracy of data in the flat files

[PHP-DB] small database

2002-11-12 Thread Seabird
Hi everyone, I'm creating a sample site for a company that does aircraft sales. I use a MySQL DB to store all the info of the available aircraft. Now, I would like to store pictures directly inside that same table, so that on the details page, it would provide a picture out of (for example)

RE: [PHP-DB] small database

2002-11-12 Thread Rich Hutchins
As you'll probably see in a lot of responses, it might be better to store the pictures in a folder on the server and store only the path to the pictures in the db. That keeps the size of the db smaller. If you choose to do that, use an HTML form with enctype=multipart/form-data and an input

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

2002-11-12 Thread Jonathan Narong
not sure i understand why you would need to use a php script for this? why not just use a static html img tag, if all you're doing is opening the picture in a new window? -jon -Original Message- From: Brett Lathrope [mailto:brett;lathrope.com] Sent: Tuesday, November 12, 2002 1:44 PM To:

RE: [PHP-DB] Access a Flat File DB - How?

2002-11-12 Thread John W. Holmes
On another topic...Does MySQL handle record locking and prevent multiple open edits by different users? Yes. ---John Holmes... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] RE: date questions in mySql

2002-11-12 Thread Jonathan Narong
yes, you need to insert the date as -mm-dd. you can go around this and still have the user see a form field with mm/dd/ but you need to break each part down, and play with the string functions so the final mysql query is in -mm-dd. -jon -Original Message- From: Paul Ihrig

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

2002-11-12 Thread John W. Holmes
I have several thumbnail images spread out in my website. I thought it would be cool to write a single PHP script so that when they click on the thumbnail, the name of the larger pic would be passed to a PHP script that displays it on its own page...I don't even care about a link back, they

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

2002-11-12 Thread John A DAVIS
Want to give the user the ability to download a dynamic Access.mdb file that has a table and linked report formatted for Avery 5160 labels. Know how to create all this stuff in VBA code, but not using PHP. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] small database

2002-11-12 Thread Hatem Ben
Check the PHP-DB archives ;-) http://news.php.net/article.php?group=php.dbarticle=22433 Hatem - Original Message - From: Rich Hutchins [EMAIL PROTECTED] To: Seabird [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, November 13, 2002 12:24 AM Subject: RE: [PHP-DB] small database As

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

2002-11-12 Thread Adam Royle
You could do something as simple as this: a href=displayPic.php?image=/path/to/image.jpgtitle=This is my titleimg src=/thumb.jpg border=0/a I think most browsers will convert the spaces in the link (when clicked) to '+' or '%20', but this may not be true with some less popular browsers (i

Re: [PHP-DB] Variable from PHP to HTML...

2002-11-12 Thread Peter Beckman
If the last reply didn't help you, try this: tdinput name=?php echo $sys; ? type=checkbox value=name?php echo $sys; ?/td Another way to write, if you aren't worried about ? being used by another processor: tdinput name=?=$sys? type=checkbox value=name?=$sys?/td Peter On Tue, 12 Nov 2002,

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

2002-11-12 Thread Peter Beckman
On Tue, 12 Nov 2002, John A DAVIS wrote: Want to give the user the ability to download a dynamic Access.mdb file that has a table and linked report formatted for Avery 5160 labels. Know how to create all this stuff in VBA code, but not using PHP. It is better to give too much information

[PHP-DB] php with mssql

2002-11-12 Thread soff
hello, I am trying to connect mssql with php, when I use mssql_pconnect(), It will fail to connect when the amount of visitors becomes large. But, when I use mssql_connect(), I can only run SELECT quern, while the INSERT/UPDATE staments doesn't work. Can somebody tell me why? thanks and sorry