RE: [PHP-DB] Why does this conditional run, even if not true?

2004-10-09 Thread Karen Resplendo
ode for the function...what is returned by the fuction determines if the code runs, right? Are you sure the code is returning "YES"? Maybe post the code for the function bastien >From: Karen Resplendo >To: [EMAIL PROTECTED] >Subject: [PHP-DB] Why does this conditional run, even if

[PHP-DB] Why does this conditional run, even if not true?

2004-10-08 Thread Karen Resplendo
$c is a field in an array I have loaded in from a text file. For some reason, none of the conditionals branch off and I end up printing out error messages for every row in the text file. My brackets are balanced, I just didn't include the bottom part: If ($c==9) { If($fieldarray[3]==

Re: [PHP-DB] Totally lost on why If statement doesn't work to call query

2004-09-15 Thread Karen Resplendo
whoa! It looks like a space. no? results of echo var_dump($z): string(4) "C " I'll try a trim statement. thanks! John Holmes <[EMAIL PROTECTED]> wrote: From: "Karen Resplendo" > $data5=odbc_do($connectionSDS,"SELECT SystemType FROM > orweb.db

[PHP-DB] Totally lost on why If statement doesn't work to call query

2004-09-15 Thread Karen Resplendo
This works: If("C"=="C") { //query and display here } This works: If("C"=="D") { //query and display here (won't happen) } In other words the query inside the If clause runs or not, depending on the logic. But, when I initialize $z=odbc_result($data5,"SystemType"); and $thissystem="C" then this do

Re: [PHP-DB] Connect to a ms access on a remote drive

2004-08-02 Thread Karen Resplendo
How about mapping a drive on the web server to the folder where the MS Access mdb is? Need to give the web user account permissions. Then all you have to do is reference the mapped drive in the path, I believe. Not sure of the security ramifications here, however. Robert Twitty <[EMAIL PROTECTE

Re: [PHP-DB] PHP use in Federal Govt

2004-07-16 Thread Karen Resplendo
http://170.104.158.16/inventory.php3 enter 00100 to get to Bend, OR water system info "Galbreath, Mark A" <[EMAIL PROTECTED]> wrote: Alls, My division at State is trying to get PHP 5.0 approved for use by developers in the Department, and the Powers That Be are requesting evidence that other Fe

[PHP-DB] Date problem: data is current as of yesterday

2004-07-02 Thread Karen Resplendo
The database queries all the sources at night after everyone has gone home. That means the data was current as of yesterday. This little snippet below returns yesterday's date, except that the first day of the month returns "0" for the day. Now, I know why this is happening, but I can't find out

[PHP-DB] Curious if include_once will work better than include

2004-04-13 Thread Karen Resplendo
Curious about "include_once" versus "include". All my connection stuff is in "conn.php3". I am planning on including it at the top of the page like this: include_once "conn.php3"; Now will that speed things up compared to just using a plain "include". I call $connectionSDWIS(which is in the

[PHP-DB] Pulldown value not passed to next page

2004-03-11 Thread Karen Resplendo
What is wrong with this picture? I build a pulldown for selecting page size(number of rows in one page). If page is new, it gives the default (selected) of 15. For some reason, when Previous/Next are clicked, the value passed is still 15 even though the pulldown says something else (5 or 15 or w

RE: [PHP-DB] Query to Array to Echo Problem--Thank you

2004-02-25 Thread Karen Resplendo
t the result row odbc_fetch_row($result);. Though that doesn't explain your column names being in the array unless that's what's in the table. <>< Ryan -Original Message- From: Karen Resplendo [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 24, 2004 5:18 PM To: [EMAIL PRO

[PHP-DB] Query to Array to Echo Problem

2004-02-24 Thread Karen Resplendo
Here is the webpage that demonstrates my code problem: http://170.104.158.16/chemlatestPAGETEST.php3?pwsno=00100 I'm so close I can smell it. Hoping someone can troubleshoot my code. Here is the piece that doesn't work. It returns the 2 column names, over and over. For some reason I'm not loadi

Re: [PHP-DB] Re: Stored procedure with UNION---no unique id, how to page?

2004-02-24 Thread Karen Resplendo
Found the answer to the first part of my question: SELECT D_Num = IDENTITY(int, 1, 1),* INTO temptable FROM someViewOrTable Frank Flynn <[EMAIL PROTECTED]> wrote: On 2/19/04 4:09 PM, "[EMAIL PROTECTED]" wrote: > From: Karen Resplendo > Date: Thu, 19 Feb 2004 11:

[PHP-DB] Stored procedure with UNION---no unique id, how to page?

2004-02-19 Thread Karen Resplendo
I have a stored procedure in msSQL that UNIONs 3 queries. There is no unique identifier that is sequential that I can use to page on webpage because the data comes from different tables/databases. Is there a way to save the resultset into a temp table and add an @@Identity(autonumber) to it? F

[PHP-DB] Paging large recordsets

2004-02-13 Thread Karen Resplendo
I guess the time has come that my boss wants "Next", "Previous", "First", "Last" paging for our data displays of large recordsets or datasets. Any good solutons out there already? I have pieces of a few examples. Also, how to deal with printing? I would assume that the ideal page size is not t

[PHP-DB] Extra blank lines bomb fgetcsv function

2003-12-01 Thread Karen Resplendo
Here is the beginning of a big loop that loads a line at a time from an uploaded textfile and then runs validation on each field: //loop through the rows putting the fields into an array

[PHP-DB] testing--no message

2003-11-26 Thread Karen Resplendo
no message! - Do you Yahoo!? Free Pop-Up Blocker - Get it now

[PHP-DB] Strtotime works for date comparisons on nonUnix--thank you :)

2003-11-07 Thread Karen Resplendo
$today = Strtotime(date("m/d/Y")); $expires=Strtotime(odbc_result($data,"Expires")); If ($today <= $expires) { echo "License has not expired"; } Else { echo "License has expired"; } :-P - Do you Yahoo!? Protect your

Re: [PHP-DB] CONVERT STRING VARIABLES TO DATES, THEN COMPARE (HOW?)

2003-11-07 Thread Karen Resplendo
Education :) (it seems like such a simple thing to do, to look up, to have in someone's library of code, yet. . . . . . .) > I can do it with my eyes closed in SQL. I don't want to if I can avoid it. It's more efficient to do so, so can I ask why you want to avoid it? -- Jason Wong -> Gre

Re: [PHP-DB] CONVERT STRING VARIABLES TO DATES, THEN COMPARE (HOW?)

2003-11-07 Thread Karen Resplendo
PHP? I can do it with my eyes closed in SQL. I don't want to if I can avoid it. Jason Wong <[EMAIL PROTECTED]> wrote: On Saturday 08 November 2003 02:44, Karen Resplendo wrote: > Apache on NT using MS SQL Srvr 2000 > PHP 4.03pl1 > > I return these dates into strings and

[PHP-DB] CONVERT STRING VARIABLES TO DATES, THEN COMPARE (HOW?)

2003-11-07 Thread Karen Resplendo
Apache on NT using MS SQL Srvr 2000 PHP 4.03pl1 I return these dates into strings and now I want to compare my database date to see if it is later than today's date. Pretty sure my "Expires" field is a string: Here is the "Expires" field from the SQL: Convert(varchar, DATEADD(Year,3,DateCertif

[PHP-DB] Still can't copy file to remote server

2003-10-24 Thread Karen Resplendo
I've been able to do using the Command Prompt on the webserver where PHP is housed, but it doesn't work in PHP: $cmd= 'cmd /c copy "C:\Program Files\Apache13 14\Apache\htdocs\AsciiCheck\a.txt" "F:\" '; print $cmd.""; passthru($cmd); This is the output on the php page: cmd /c copy "C:\Program

RE: [PHP-DB] Can't copy file to another server

2003-10-24 Thread Karen Resplendo
have wrte permission on your drive F: from the web server? -Original Message- From: Karen Resplendo [mailto:[EMAIL PROTECTED] Sent: 23 October 2003 22:18 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Can't copy file to another server Nope. Already tried that. Warni

Re: [PHP-DB] Can't copy file to another server

2003-10-23 Thread Karen Resplendo
Nope. Already tried that. Warning: Unable to create 'F:/portlandApr05-08-2002.txt': Permission denied in C:/Program Files/Apache13 14/Apache/htdocs/file_upload.php3 on line 172 [EMAIL PROTECTED] wrote: do you just need a / $AcceptedFolder= 'F:/'; Karen Res

[PHP-DB] Can't copy file to another server

2003-10-23 Thread Karen Resplendo
Apache on Windows web server. After file upload and validation I would like to copy it to a folder on a Win 2K Server machine. We have created the folder and shared it and mapped a drive(F:) on the Webserver to it: $AcceptedFolder= 'F:'; $AcceptedFileAndPath=$AcceptedFolder.$HTTP_POST_FILES['use

[PHP-DB] How do I get quotes around strings to display?

2003-10-21 Thread Karen Resplendo
My ascii file coming in has quotes around each comma delimited item. After reading the rows into array these quotes are gone. Can't figure out how to put them back in the array items when displaying the fields. Rows are saved to table and bad rows are displayed in browser. Hope this fits this li

Re: [PHP-DB] Urgent help needed

2003-10-21 Thread Karen Resplendo
In the input definition onclick call a javascript function with all your parameters. Might be a missing quote here and there but this is close to ones I use all the time: echo ""; Now here is what is in "yourjavascriptfunctio('$parameter1,$parameter2,$parameter3'): function yourjavascriptfunc

[PHP-DB] How can I tell if Recordset is empty using MSSQL and ODBC?

2003-10-20 Thread Karen Resplendo
In VBscript an empty recordset returns the "End of File" marker: If rs.EOF Then do nothing How can I do this in PHP using MS SQL Server and ODBC drivers? Here is a peace of my code: $data= odbc_do($connectionSDWIS,"SELECT LabUserName, LabName, WhichProcess FROM LabLogin WHERE LabUserName='

Re: [PHP-DB] fgetcsv() only returns half of the rows

2003-09-26 Thread Karen Resplendo
ts($handle,300); $buffer = str_replace("\"","",$buffer); print $buffer."";*/ Warning: more on this later :) Jason Wong <[EMAIL PROTECTED]> wrote: On Saturday 27 September 2003 01:24, Karen Resplendo wrote: > Does that mean that my length setting

Re: [PHP-DB] fgetcsv() only returns half of the rows

2003-09-26 Thread Karen Resplendo
at should I set the length at?: $buffer = fgets($handle,300); $buffer = str_replace("\"","",$buffer); print $buffer.""; Jason Wong <[EMAIL PROTECTED]> wrote: On Friday 26 September 2003 23:46, Karen Resplendo wrote: > There are 113 rows in my co

[PHP-DB] How to post code and avoid spam filter in Yahoo?

2003-09-26 Thread Karen Resplendo
I keep getting Spam warnings on this list whenever I post code. Is there anyway around this? I'm not sure my questions can be answered without showing the code that I am having trouble with. If not, then I will have to get my boss to subscribe and post from his ISP account. Karen -

[PHP-DB] fgetcsv() only returns half of the rows

2003-09-26 Thread Karen Resplendo
There are 113 rows in my comma delimited text file and the code below only displays 62 of them. It executes very quickly so I'm not thinking there is a time out problem. Any ideas? //here is URL with fgetcsv() explanation: http://us3.php.net/manual/en/function.fgetcsv.php $uploadthis = 'C:/A

[PHP-DB] Curious code behavior inside/outside function

2003-09-24 Thread Karen Resplendo
I can't get odbc call to work inside of a function. It works on the outside, then I pass the recordset and fieldname to the function to use the data. I would like to just have the whole odbc stuff inside the function. Am I missing something obvious? This is the error I get for the odbc_do line: