Re: [PHP-DB] Help please

2002-12-10 Thread DL Neil
SpiderWebb, One posting to one list is enough... I dont know if this is possible in PHP (Newbie) im working on a project where each product has 3 diffierent prices depending on the amount sold so say for example 1- 100 price A 101-299 price B and above 300 Price C. What I need to be able to

[PHP-DB] Help nedded

2002-12-10 Thread SpiderWebb
I dont know if this is possible in PHP (Newbie) im working on a project where each product has 3 diffierent prices depending on the amount sold so say for example 1- 100 price A 101-299 price B and above 300 Price C. What I need to be able to do is increment an mysql database field each time an

Re: [PHP-DB] The noobest of questions...

2002-12-10 Thread DL Neil
Hi Brett, [please keep conversations on the list - someone else might have helped you more promptly - others might benefit from following the conversation] This is how I have the code written: if ($num_results 0){ fopen(http://www.vcathletics.org/Misc/AdminMenu.htm,r;); } If I go to

Re: [PHP-DB] More Apache Installation problems

2002-12-10 Thread DL Neil
Alex, Congrats at getting Apache off the ground. Lots of advice here about hardware, but... Are both your WS and Svr Windows boxes? If so, which OpSys? If you want both to share access to the Internet, consider modem sharing or ICS (Internet Connection Service - IIRC - M$ not v.generous on advice

[PHP-DB] adding in array

2002-12-10 Thread Martin Allan Jensen
Hi all, I have a problem i know you can help me with. I have this flushet out from a loop command: Year: 2000 ID: 14 Value: 300 Year: 2002 ID: 11 Value: 640 Year: 2002 ID: 10 Value: 100 Year: 2003 ID: 11 Value: 200 Year: 2004 ID: 11 Value: 150 Year: 2005 ID: 11 Value: 250 I need PHP

[PHP-DB] Re: adding in array

2002-12-10 Thread Bastian Vogt
Hi, I'ld suggest this: // inside your loop $array[$year] += $value; HTH, Bastian Martin Allan Jensen schrieb: Hi all, I have a problem i know you can help me with. I have this flushet out from a loop command: Year: 2000 ID: 14 Value: 300 Year: 2002 ID: 11 Value: 640 Year: 2002

[PHP-DB] Re: adding in array

2002-12-10 Thread Radovan Radic
Bastian Vogt [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I'ld suggest this: // inside your loop $array[$year] += $value; HTH, Bastian Lets say $year is 2000 There is not defined index 2000 at $array. It is going to be undefined offset. -- PHP

[PHP-DB] Re: adding in array

2002-12-10 Thread Bastian Vogt
Lets say $year is 2000 There is not defined index 2000 at $array. It is going to be undefined offset. Hm... I think it's gonna work, but if it's one of the don'ts in progamming style, could you tell me why you shouldn't do this and how to make it better (and nice)? Regards, Bastian -- PHP

[PHP-DB] Re: adding in array

2002-12-10 Thread Radovan Radic
Bastian Vogt [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Lets say $year is 2000 There is not defined index 2000 at $array. It is going to be undefined offset. Hm... I think it's gonna work, but if it's one of the don'ts in progamming style, could you

RE: [PHP-DB] How do I change ?

2002-12-10 Thread John W. Holmes
How do I strip from a string? Actually, I need to change it to a legal char so I can send it via the URL. Look at www.php.net/urlencode or www.php.net/rawurlencode ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

[PHP-DB] Re: adding in arrays

2002-12-10 Thread Seraphim
But, now i need to make another loop where it takes the key [2000] and put's it into $year and takes the value 300 and put it into $value Can you help me with it, am really not good at arrays. you can assign the variables like this: $year = '2000' $value = array['2000'] //gets the

[PHP-DB] Re: adding in array

2002-12-10 Thread Seraphim
for($i=0;$i5;$i++){ for($j=0;$j5;$j++){ $new_array[$i]+=$j; } } for($i=0;$i5;$i++){ print($new_array[$i]); } this works, so Vogt's solution should solve your problem Lets say $year is 2000 There is not defined index 2000 at $array. It is going to be undefined offset.

RE: [PHP-DB] RE: adding in arrays

2002-12-10 Thread Ford, Mike [LSS]
-Original Message- From: Martin Allan Jensen [mailto:[EMAIL PROTECTED]] Sent: 10 December 2002 12:41 But, now i need to make another loop where it takes the key [2000] and put's it into $year and takes the value 300 and put it into $value Can you help me with it, am really not

Re: [PHP-DB] Help nedded

2002-12-10 Thread Mark
You might read the database to see how many have been sold previously and put that into a PHP variable. Add the amount that you'd be incrementing it by (I assume it's possible that it will increment by more than one at a time), determine the price point, and then update the row with both the new

[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

[PHP-DB] MSSQL Text Length Restriction

2002-12-10 Thread Adam Voigt
I can't seem to get more then 255 characters to be sent back from a field in our MSSQL database, unless the fields is a TEXT type, which is very inefficient. Anyone know a fix? (I've already tried modifying the max size variables in the php.ini under the MSSQL section.) -- Adam Voigt

RE: [PHP-DB] Dynamic Table Front End

2002-12-10 Thread Rich Gray
You didn't mention it so did you check http://www.phpclasses.org - there's a lot of good stuff there - you will need to register however. HTH Rich -Original Message- From: Hutchins, Richard [mailto:[EMAIL PROTECTED]] Sent: 10 December 2002 14:52 To: [EMAIL PROTECTED] Subject: [PHP-DB]

RE: [PHP-DB] MSSQL Text Length Restriction

2002-12-10 Thread Jeffrey_N_Dyke
this little snippet works for me. mssql_query(set textsize 65536); HTH Jeff Adam Voigt

RE: [PHP-DB] MSSQL Text Length Restriction

2002-12-10 Thread Adam Voigt
Didn't work, thanks anyway. On Tue, 2002-12-10 at 10:43, [EMAIL PROTECTED] wrote: this little snippet works for me. mssql_query(set textsize 65536); HTH Jeff

RE: [PHP-DB] MSSQL Text Length Restriction

2002-12-10 Thread Adam Voigt
Uncommented, and set to the max value (2147483647). No effect. On Tue, 2002-12-10 at 10:57, [EMAIL PROTECTED] wrote: Adam. are these lines uncommented in your php.ini? They are under [MSSQL] ; Valid range 0 - 2147483647. Default = 4096.

[PHP-DB] Form Best Practice/Help...

2002-12-10 Thread NIPP, SCOTT V (SBCSI)
I am working on an application and I am not having a lot of luck getting a form to behave the way I want. I am trying to keep the form self referencing, not sure if that is the correct terminology. The form is an approval form that queries a database to create a list of checkboxes.

RE: [PHP-DB] MSSQL Text Length Restriction

2002-12-10 Thread Rich Gray
Adam IIRC this is a known problem with the native php SQL Server APIs which were built using the original TDS drivers based on v6.x of SQL Server which did not support NVARCHAR data types... if you can't change the datatype to TEXT then try a cast. Failing that does it work if you use ODBC

RE: [PHP-DB] MSSQL Text Length Restriction

2002-12-10 Thread Rich Gray
Adam IIRC this is a known problem with the native php SQL Server APIs which were built using the original TDS drivers based on v6.x of SQL Server which did not support NVARCHAR data types... if you can't change the datatype to TEXT then try a cast. Failing that does it work if you use ODBC

[PHP-DB] mail

2002-12-10 Thread Edward Peloke
I know this is off the topic of dbs but I can't get the mail function to work, I get this error. Does the script need to be in the apache root? Thanks, Eddie Warning: Failed to Receive in c:\program files\apache group\apache\htdocs\aircharter\working\verify_login.php on line 69

[PHP-DB] Has Bug 7634 been fixed?

2002-12-10 Thread Chitchyan, Ruzanna
Hi list Anyone knows if the bug reported in http://bugs.php.net/bug.php?id=7634 has been fixed (the bug : lock table and mysql_pconnect used together could hang the server if the tables have not been unlocked before script terminates)? Thanks R -- PHP Database Mailing List

[PHP-DB] read a file from local harddisk

2002-12-10 Thread dufronte
HI... sorry to interrupt again... I have another ridiculous question... I have a text file in my machine... and a php-file in my host (such as host.sk etc..) I want to use my php-file to access my text file in my machine directly... I used fopen, and fread stuff... but didn't work Btw,

[PHP-DB] Global variables

2002-12-10 Thread Jim
Can I define a global variable in a function and then successfully reference it in the rest of the page? I know that globals are usually defined in the page scope and referenced in a function by specifying them as globals, but it seems logical that a variable can be created and given a value

RE: [PHP-DB] read a file from local harddisk

2002-12-10 Thread dufronte
Well I don't know how to make a socket connections... can you give me an example please... Sorry to bother you :D --www.kapsul.org-- DuFronte -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 8:36 PM To: [EMAIL PROTECTED]

RE: [PHP-DB] Global variables

2002-12-10 Thread Ford, Mike [LSS]
-Original Message- From: Jim [mailto:[EMAIL PROTECTED]] Sent: 10 December 2002 18:51 Can I define a global variable in a function and then successfully reference it in the rest of the page? Yes. (Why didn't you just try it?) Cheers! Mike

RE: [PHP-DB] read a file from local harddisk

2002-12-10 Thread dufronte
I tried fsockopen()... but it doesn't work too... --www.kapsul.org-- DuFronte -Original Message- From: dufronte [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 11, 2002 1:49 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] read a file from local harddisk

[PHP-DB] Update Query Help...

2002-12-10 Thread NIPP, SCOTT V (SBCSI)
I am attempting to UPDATE a table and I have having absolutely ZERO success. Here is the query: $tmp = $_POST['sbcuid'].-.$_POST['system'][$a]; $update = UPDATE accounts SET atime='NOW()' WHERE \id-sys\='.$tmp.'; echo $update; $result1 =

Re: [PHP-DB] MSSQL Problems

2002-12-10 Thread Tim Evans
Looks like this groups saves the day again. John Krewson [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... mssql_pconnect cannot be closed as you mentioned: http://www.php.he.net/manual/en/function.mssql-pconnect.php I am using this as well, calling MSSQL on a

Re: [PHP-DB] Update Query Help...

2002-12-10 Thread 1LT John W. Holmes
$tmp = $_POST['sbcuid'].-.$_POST['system'][$a]; $update = UPDATE accounts SET atime='NOW()' WHERE \id-sys\='.$tmp.'; echo $update; $result1 = mysql_query($update, $Prod) or die(mysql_error()); echo mysql_affected_rows(); Try: $update = UPDATE accounts SET atime=NOW() WHERE id-sys='$tmp';

RE: [PHP-DB] Update Query Help...

2002-12-10 Thread SELPH,JASON (HP-Richardson,ex1)
is it a mysql field type of datetime? if so, you may want to use this instead $timestamp=date(Y-m-j H:i:s); $update = UPDATE accounts SET atime='$timestamp' WHERE id-sys='$tmp'; that puts the current timestamp in mysql format for entry into your table. Cheers Jason -Original Message-

Re: [PHP-DB] Update Query Help...

2002-12-10 Thread DL Neil
SCOTT, I am attempting to UPDATE a table and I have having absolutely ZERO success. Here is the query: $tmp = $_POST['sbcuid'].-.$_POST['system'][$a]; $update = UPDATE accounts SET atime='NOW()' WHERE \id-sys\='.$tmp.'; echo $update; $result1 = mysql_query($update, $Prod) or

[PHP-DB] Select Query Help...

2002-12-10 Thread Michael Knauf/Niles
select query question OK, I have 3 tables Products Table prodid fgnumber name description Faqs Table faqid question answer FaqsRelatedToProducts Table fpid fgnumber faqid I want to select all the faq question and answer pairs that

Re: [PHP-DB] Update Query Help...

2002-12-10 Thread DL Neil
SCOTT, The list's crystal ball filter is down for maintenance. Show us the tbl schema and the debug print of $update. Then we won't be firing blind! =dn I understand that the column name does not normally need quotes, but without quotes on the column name I get a mysql error message about no

RE: [PHP-DB] Update Query Help...

2002-12-10 Thread NIPP, SCOTT V (SBCSI)
I have definitely isolated the problem. If I change the column name that the match is being performed on from 'id-sys' to 'id_sys' I can execute the query without having to worry about quoting the column name and everything works. I think that I am just going to leave the column name

[PHP-DB] Windows vs Linux variable passing

2002-12-10 Thread Steve Stephens
I'm REALLY new at this and someone else actually wrote the following but, can anyone tem me why this works in Windows but not in Linux? It falls through to the NO, it's still not working statement. If I remove the $ in $con from $result = mysql_query(SELECT * FROM mytable WHERE myrow REGEXP

Re: [PHP-DB] Update Query Help...

2002-12-10 Thread 1LT John W. Holmes
I have definitely isolated the problem. If I change the column name that the match is being performed on from 'id-sys' to 'id_sys' I can execute the query without having to worry about quoting the column name and everything works. I think that I am just going to leave the column name

[PHP-DB] First time caller, long time listener...

2002-12-10 Thread Hartleigh Burton
Hi guys'n'gals ;) I am very new to the world of PHP, and still trying to get my foot in the door. Not doing too bad so far, good fun it all is... but i am having a problem working out what exactly the problem is here with sessions. Here is the code for page one of the tutorial, i copied it

[PHP-DB] Still having problems...?!

2002-12-10 Thread Hartleigh Burton
Thanks John and Cornelia for a fast response :). I have edited my ini file as you suggested, and I changed the code around a bit and experimented a bit more with it, but I still have some problems. This is exactly how the file looks; ? // page1.php session_start();

[PHP-DB] WG: Still having problems...?!

2002-12-10 Thread [EMAIL PROTECTED]
hello burton, can you send session.save_path from your php.ini here? a.v.l Hartleigh Burton [EMAIL PROTECTED] schrieb im Newsbeitrag news:[EMAIL PROTECTED]... Thanks John and Cornelia for a fast response :). I have edited my ini file as you suggested, and I changed the code around a bit and

RE: [PHP-DB] Still having problems...?!

2002-12-10 Thread Rich Gray
Is PHP running as a module in Apache/IIS? If yes then you will need to bounce your web server to pick up the new ini settings... Rich -Original Message- From: Hartleigh Burton [mailto:[EMAIL PROTECTED]] Sent: 10 December 2002 14:01 To: [EMAIL PROTECTED] Subject: [PHP-DB] Still having

Re: [PHP-DB] Still having problems...?!

2002-12-10 Thread 1LT John W. Holmes
Warning: open(/tmp\sess_1df563d6d8c8b4b16534c438251e7107, O_RDWR) failed: No such file or directory (2) in E:\Webroot\tutorial\page1.php on line 3 Warning: open(/tmp\sess_1df563d6d8c8b4b16534c438251e7107, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Failed to

[PHP-DB] Thanks peeps ;)

2002-12-10 Thread Hartleigh Burton
John hit the nail right on the head, i was editing the windows\php.ini, after all thats what the manual said PHP uses. When in actual fact it was the copy of php.ini I had in my PHP root directory. Anyways, cheers for the help :) Hartleigh Burton www.channel-x.org -- PHP Database Mailing

Re: [PHP-DB] Select Query Help...

2002-12-10 Thread Ignatius Reilly
Try: SELECT DISTINCT F.question, F.answer FROM Faqs AS F, FaqsRelatedToProducts Table AS FP WHERE F.faqid = FP.faqid DTH? Ignatius - Original Message - From: Michael Knauf/Niles [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December

[PHP-DB] Final question of the week :-)

2002-12-10 Thread Chris Payne
Hi there everyone, I use the following code to collect date from multiple tickboxes on my form: if (count($selection) = 1) { for ($i=0;$icount($selection);$i++) { echo $selection[$i]; }}; $selection is the ID number and passes fine, but what I need it to do is query my DB via the above query

[PHP-DB] email form

2002-12-10 Thread Ryan Holowaychuk
I am trying to figure out how to take the data that I have collected in a form and format it into another page basically a bunch of tables and graphics, and then email that form to a specific email address. I have been able to get it to collect, place into the page, but now how to email the

RE: [PHP-DB] email form

2002-12-10 Thread Ryan Jameson (USA)
Try the mail function, you can get creative and use html as well. It's documented: http://www.php.net/manual/en/function.mail.php Ryan -Original Message- From: Ryan Holowaychuk [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 10, 2002 4:23 PM To: [EMAIL PROTECTED] Subject: [PHP-DB]

[PHP-DB] Re: Help needed

2002-12-10 Thread Hugh Bothwell
Spiderwebb [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I dont know if this is possible in PHP (Newbie) im working on a project where each product has 3 diffierent prices depending on the amount sold so say for example 1- 100 price A 101-299 price B and above

RE: [PHP-DB] email form

2002-12-10 Thread Ryan Holowaychuk
This is where I am stuck, I can not get the variables to be placed in to the email. /* message */ $message = ' html head titleQuote Request/title /head body font size=4 face=Arial, Helvetica, sans-serif font color=#FF table width=105% border=0 cellspacing=3 cellpadding=2 tr

RE: [PHP-DB] email form

2002-12-10 Thread Frank M. Kromann
Hi, When you use single quotes to define your strings php variables will not be replaced. Try $message = ...$customer..; You will have to escape all double quotes used in the string (\) or use single quote. - Frank This is where I am stuck, I can not get the variables to be placed in to

RE: [PHP-DB] read a file from local harddisk

2002-12-10 Thread dufronte
All my reasons to ask you all about this ,because I'm currently developing a web-base multiplayer game with PHP. In my game, I created my Own browser with VB so user will probably don't know which files they're executed (for security reasons). But the problem is, I really hard too figure out how

[PHP-DB] Typical login script... user problem... :)

2002-12-10 Thread Hartleigh Burton
Hi everyone, I am giving a shot at a typical login script, which plucks usernames, passwords, and access levels from 2 databases. The passwords database uses md5 encryption, I havn't much of a clue what I am doing with that though. My real problem, if thats not it, lies with the verification. I

Re: [PHP-DB] Typical login script... user problem... :)

2002-12-10 Thread Jason Wong
On Wednesday 11 December 2002 13:10, Hartleigh Burton wrote: ? if ($submit) { $db = mysql_connect(localhost, dbname, dbpassword); mysql_select_db(mydb, $db); $db_user = SELECT ID FROM dbusers WHERE UserName = '$username'; $db_pass = SELECT