php-windows Digest 2 May 2001 07:16:19 -0000 Issue 575

Topics (messages 7182 through 7194):

connecting to the db server
        7182 by: thegraphicguru

Re: php4win.de distribution
        7183 by: Daniel Beulshausen

ASPs cSTR function, WTF??!!!
        7184 by: r.gelstharp

custom functions/procedures in PHP
        7185 by: r.gelstharp
        7186 by: Zak Greant

PHP equiv of ASP "Request.ServerVariables( "SCRIPT_NAME" )"
        7187 by: r.gelstharp
        7191 by: Zak Greant

SQL Error - create temporary table
        7188 by: John Morrison

COM bugs in PHP 4.0.5 final release
        7189 by: Jason Gan

http_post_files doesnt return file type
        7190 by: Tomasz Abramowicz

sybase_connect
        7192 by: Dena Marchant
        7193 by: Warren Harris

Re: need your opinion
        7194 by: Johan Lundqvist

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------


Hi, I just recently installed Microsoft SQL Server 2000 on my 
machine, and I am having troubles connecting to it from a php 
page...

how do I use these 2 functions to connect to my database server 
and table?

MSSQL_CONNECT();
and MSSQL_SELECT_DB();

thanks in advance

Sincerely,

Louie Penaflor
Finishline Studios
Formerly known as Go To Usa Inc. 

________________________________________________________________
Sent via the FinishLine Studios Webmail system at 
finishlinestudios.com


 
                   




At 11:02 01.05.2001 -0400, Jeff Brewster wrote:
>Are there any sites that mirror this distribution of php4 for NT/2000,
>with oracle pre-compiled?  I need this distribution for a large project
>and the www.php4win.de site is down.  If anyone can provide a link to
>download this I would greatly appreciate it.

there'll be new builds available within the next few days, don't worry...

daniel

/*--
daniel beulshausen - [EMAIL PROTECTED]
using php on windows? http://www.php4win.de





In the attempt at trying to convert my ASP pages to PHP, I've run across a
little include file that contains a number of functions.

this is the function I'm trying to emulate :-

FUNCTION SELECTED( firstVal, secondVal )
  IF cSTR( firstVal ) = cSTR( secondVal ) THEN
    SELECTED = " SELECTED "
  ELSE
    SELECTED = ""
  END IF
END FUNCTION

does anyone know what this cSTR function is and what it does? Furthermore,
is there a PHP equivalent?

Many thanks,
Matt Bridger






I'm trying to convert my ASP pages into PHP, but I've come across a snag
with an included page that contains a load of custom functions .

I tried a C-like way of trying to construct the functions/procedures, but it
didn't work.

How do you construct functions in PHP? What's the syntax and what variable
types do you have for when you're passing parameters?






This information can be found in the PHP manual

Main Link:
http://www.php.net/manual/en/

Function specific information:
http://www.php.net/manual/en/functions.php

--zak

----- Original Message -----
From: "r.gelstharp" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 01, 2001 2:30 PM
Subject: [PHP-WIN] custom functions/procedures in PHP


> I'm trying to convert my ASP pages into PHP, but I've come across a snag
> with an included page that contains a load of custom functions .
>
> I tried a C-like way of trying to construct the functions/procedures, but
it
> didn't work.
>
> How do you construct functions in PHP? What's the syntax and what variable
> types do you have for when you're passing parameters?
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





Is there a PHP equivalent of "Request.ServerVariables( "SCRIPT_NAME" )" from
ASP?







r.gelstharp wrote:
> Is there a PHP equivalent of "Request.ServerVariables( "SCRIPT_NAME" )"
from
> ASP?

    The value will be available in the $HTTP_SERVER_VARS array as
    $HTTP_SERVER_VARS['SCRIPT_NAME'] and/or as $SCRIPT_NAME or via
    the getenv() function.

    You really should review the first three sections of the PHP manual
    it contains the answers to all of your recent questions.

    --zak





Hi

I have cobbled together my first PHP/MySQL site which 
checks out OK on "localhost" (a WinMe/Xitami PC). But I 
just uploaded it to my ISP and I'm getting SQL Error 
reports when trying to create temp tables.

SQL Error near "create temporary table tmptable select 
p.pic_id, title from picture as p, keycode_link as k where 
p.pic_id = k.pic_id and k.label_code = 1 and k.keyword_code 
= 5";

These temp table commands work OK on my setup (MySQL 
3.23.30) and I haven't yet figured out what is going wrong.

John Morrison






The 4.0.5 release seems to be buggy with the COM functions, so it might be
better to wait for a few weeks for a bug-fix release.


-----Original Message-----
From: Jeff Brewster [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 2 May 2001 1:02 AM
To: [EMAIL PROTECTED]
Subject: php4win.de distribution


Are there any sites that mirror this distribution of php4 for NT/2000,
with oracle pre-compiled?  I need this distribution for a large project
and the www.php4win.de site is down.  If anyone can provide a link to
download this I would greatly appreciate it.

Jeff






this is taken straight from phpinfo(), as you can see
its all there except for type. I was wondering why
wouldnt my RH7.0, Apache 1.3.12 w/ PHP4.0.4pl1
know what the file type was...

HTTP_POST_FILES["userfile1"] 

Array
(
    [name] => palazzina1.jpg
    [type] => 
    [tmp_name] => /tmp/phpewzSBs
    [size] => 10272
)

tnx,
t.





Hey,

I have just set up iis5 and php on my home computer
So that I can work without an internet connection
on a remote site.  Build the pages at home, connect,
and move the pages onto the main site.

My connection string is not working, though and I'm
not sure what the problem is.

My SQL server is "MICA", database "stuDev" and the
password is "xy&Pass".

<?PHP
        $conn = sybase_connect("mica", "stuDev", "xy&Pass");
?>

The error i'm getting is:
Fatal error: Call to undefined function: sybase_connect() in
c:\inetpub\wwwroot\stuart\test.php on line 2

I'm not sure how to trouble shoot this and would
welcome any ideas.

Thanks!
Dena





I'm having the same problem, had to switch to using ODBC.

Is sybase_connect() no good for sybase's SQLAnywhere product?


""Dena Marchant"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hey,
>
> I have just set up iis5 and php on my home computer
> So that I can work without an internet connection
> on a remote site.  Build the pages at home, connect,
> and move the pages onto the main site.
>
> My connection string is not working, though and I'm
> not sure what the problem is.
>
> My SQL server is "MICA", database "stuDev" and the
> password is "xy&Pass".
>
> <?PHP
> $conn = sybase_connect("mica", "stuDev", "xy&Pass");
> ?>
>
> The error i'm getting is:
> Fatal error: Call to undefined function: sybase_connect() in
> c:\inetpub\wwwroot\stuart\test.php on line 2
>
> I'm not sure how to trouble shoot this and would
> welcome any ideas.
>
> Thanks!
> Dena
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>






Yes Mike, but if it's a larger database you might wanna use the
functions in MySQL instead. Then you will save time and memory by not
selecting everything everytime and then process it in php.

Take a look at 7.4.9 in MySQL doc
(http://www.mysql.com/doc/M/a/Mathematical_functions.html).

/Johan

Michael Rudel wrote:
> 
> Hi Afan.
> 
> U can use the ceil() -function.
> Look in the manual @section: XXXIII. Mathematical Functions
> 
> Greetinx,
>   Mike
> 
> Michael Rudel
> - Web-Development, Systemadministration -
> _______________________________________________________________
> 
> Suchtreffer AG
> Bleicherstraße 20
> D-78467 Konstanz
> Germany
> fon: +49-(0)7531-89207-17
> fax: +49-(0)7531-89207-13
> e-mail: mailto:[EMAIL PROTECTED]
> internet: http://www.suchtreffer.de
> _______________________________________________________________
> 
> > -----Original Message-----
> > From: afan [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, April 27, 2001 10:38 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] need your opinion
> >
> >
> > Hi all,
> > I made a simple code but I think that there is a better  way
> > to do same thing.
> >
> > I have list with couple hundreds "entries" and I want to have
> > it 50 per page.
> > I did it this way and it works.
> >
> >
> > $result = mysql_query("SELECT id FROM source ORDER BY id ASC", $db);
> > while($myrow = mysql_fetch_array($result))
> > {
> >  $IDArray[] = $myrow[id];
> > }
> > $NoOfEntries =  count($IDArray);         //   Number of entries
> > $NoOfPages = $NoOfEntries / 50;        //    Number of pages
> > with 50 entries per page
> >
> > //        E.g.  3.854 pages means 4 pages. The way I'm doing
> > is check is $NoOfPages > integer($NoOfPages)
> >
> > $NoOfPagesInt = $NoOfPages;
> > settype($NoOfPagesInt, "integer");
> > if($NoOfPages > $NoOfPagesInt):
> >  $NoOfPages++;
> > endif;
> >
> >
> > Any suggestions?
> >
> > Thanks!
> >
> > Afan
> >
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


Reply via email to