Re: [PHP-DB] adding Carrol O'Conner in a form

2001-06-30 Thread Doug Semig
You may want to use stripslashes($name) in there instead of just $name. Doug At 09:18 PM 6/30/01 -0700, Ken Sommers wrote: >HI, >IF i add my name as Carol O'Conner in a form and Echo (PHP 4.06 on win 95) it back I see > >Carol O\'Conner > ... snip ... > >I am already using: > > > >Thanks fo

[PHP-DB] adding Carrol O'Conner in a form

2001-06-30 Thread Ken Sommers
HI, IF i add my name as Carol O'Conner in a form and Echo (PHP 4.06 on win 95) it back I see Carol O\'Conner If I pass that name along to another page I'll see it as: Carol O\\\'Conner Even if I use : IF I enter my name as:Carol O'Conner I'll see it echoed as Carol O\'Conner

Re: [PHP-DB] sybase function for MS-SQL Server

2001-06-30 Thread Frank M. Kromann
Hi, > Query Analyzer" perfectly. > e.g. > SP1: (works) > CREATE PROCEDURE SP1 AS > insert into mytable values(...) > select * from mytable Only one result set. > > SP2: (doesn't work) > CREATE PROCEDURE SP2 AS > select * from mytable > select * from mytable Two result sets > > SP3: (

[PHP-DB] PEAR DB, prepare(), and placeholders

2001-06-30 Thread Paul DuBois
Question 1: When using PEAR DB, are you supposed to be able to use a prepared statement multiple times? I would suppose yes, but when I execute the code below, the second use of the prepared statement results in an error: $stmt = $conn->prepare ("INSERT INTO abc (i, c) VALUES (?, ?)"); if (DB::

Re: [PHP-DB] how to preseve value of radio-butons when form is refreshed?

2001-06-30 Thread Miles Thompson
Hector, You can do it all in one script, and for the best explanation go to http://www.thickbook.com and check out the tutorials. I believe you want the one which deals with custom error messages. You can find similar examples on DevShed and Weberdev. Essentially your script is divided into tw

RE: [PHP-DB] delay script

2001-06-30 Thread support
Or you could do: Then you don't have to hope that the client's browser supports an html meta tag for refresh. -- Allen Lee http://MissoulaWeb.com Hosting, Programming and Design On Fri, 29 Jun 2001, Michael Rudel wrote: > Hi Jennifer, > > use my function: > > // Redirects to another

[PHP-DB] Formatting Strings in MySQL

2001-06-30 Thread Artur Correia
Hey How can I get a string (or number) from mySQL like "123123123" to display "123 123 123"?? Tks I'm kinda rookie Artur -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administr

[PHP-DB] problems connecting to remote oracle database

2001-06-30 Thread phil
Hi folks, I'm having difficulties getting php4 to connect to a remote oracle database. I have an entry in tnsnames.ora, along the lines of shorthostname = (etc, etc) and I can use "sqlplus user/name@shorthostname" to connect just fine, as a regular user. Even without ORACLE_SID set, since I ha

Re: [PHP-DB] sybase function for MS-SQL Server

2001-06-30 Thread jong jong
I am almost crazy now after playing with these codes over 10 hours. I don't expect to call sybase_query() one by one for executing sql batch. It just doesn't work for me like what I said yesterday. Now I try to make a stored procedure for these sql batch. So I can call sybase_query() only once. B

Re: [PHP-DB] Passing XML

2001-06-30 Thread Hugh Bothwell
From: "olinux o" <[EMAIL PROTECTED]> To: "Hugh Bothwell" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, June 29, 2001 10:25 PM Subject: Re: [PHP-DB] Passing XML > Is this what you have in mind? > > $url = 'http://website.com/document.xml'; > $str = implode('', file($url)); > $str = conta

Re: [PHP-DB] Passing XML

2001-06-30 Thread olinux o
Is this what you have in mind? $url = 'http://website.com/document.xml'; $str = implode('', file($url)); $str = contains the xml doc and retains formatting [spaces, newlines] $url could be a doc on the local server as well. --- Hugh Bothwell <[EMAIL PROTECTED]> wrote: > I'm not sure how you m

[PHP-DB] correct on "sybase function for MS-SQL Server"

2001-06-30 Thread jong jong
I have to correct this: The following stored procedure did add 2 records into "mytable" after I called sybase_query("exec SP",$conn). But it just returned "false" like what I said yesterday. Anyway, 2 records went to my database. That's better than 1. So I don't care this "false". SP: CREATE PROC

RE: [PHP-DB] Grabbing string between two other strings.

2001-06-30 Thread olinux o
the ends will not always be the same - they will be pieces of html code tho - ie. ... I am having a bit of trouble because the ereg function only finds the FIRST result even though the docs refer to matchES [as in more than one]. So. i think that the preg_match_all() looks most promising, however

[PHP-DB] maintaining Apache user authentication DB/DBM with PHP

2001-06-30 Thread Richard M. Pavonarius
Has anyone successfully used db2 with PHP? I can get it to work with GDBM, but apparently Apache mod_db or mod_dbm on Linux can't use GDMB. Here's how I compiled php4.0.6 on RH 6.2: ./configure --prefix=/usr/local \ --with-apxs=/usr/sbin/apxs \ --with-config-file-path=/etc/httpd/conf \ --enable

Re: [PHP-DB] cites/states data

2001-06-30 Thread Ted Rolle
> It's public info, so free, and Hah! Try to get the 9-digit ZIP code stuff. Developed with tax dollars and sold by (I believe) a private corporation. Isn't it great that we're not getting all of the government we're paying for? -- PHP Database Mailing List (http://www.php.net/) To unsubsc

Re: [PHP-DB] TO_DAYS() equivalent?

2001-06-30 Thread Hugh Bothwell
How about this? define("SECONDS_PER_DAY", 86400); $now = (int) (time() / SECONDS_PER_DAY); Note that this may not match the time you get from your database server, depending on what time zones you're in. ""David W. Banks"" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROT

Re: [PHP-DB] most efficient weighting system? URGENT

2001-06-30 Thread Hugh Bothwell
How many rows are you likely to have, and how dynamic are the weights? I think I'd add a "cumulative sum" column to your table, ie idweightcum_weight 11010 25 15 3318 42038 52

[PHP-DB] most efficient weighting system? URGENT

2001-06-30 Thread Noah Spitzer-Williams
if i have several rows in a table and i want some to have certain weights what is the best way to pick a random row based on its weight? ex of table: idweight 1 10 25 33 420 52 therefore, since there is a total weight of 40, id 1 should be picked 25% (10/40) of the time,

[PHP-DB] ereg_replace

2001-06-30 Thread olinux o
I have a large string and want to replace some substrings in it. This substrings are delimited by a pair of tags (all substrings), say: and . i.e. There is the tag at the beginning of the substring I want to replace and a tag at the end. There are several of this substrings along my large strin

[PHP-DB] cites/states data

2001-06-30 Thread Jaskirat
Hello all, I am creating a database driven php page for which I need to have a database of US and Canadian states and cities in the back end. Is there some place on the web where I can get such data in the reusable form and I can feed my MySQL tables with that. Right now the only option I have is

[PHP-DB] What does this error mean?

2001-06-30 Thread Jimi Malcolm
I'm trying to from a file in a directory called 'logs'. I've never seen this error before. What does it mean? <<>> Warning: fopen("logs/993700800.log","w+") - Permission denied in /home/sites/site20/users/guide/web/counter.php on line 28 Warning: Supplied argument is not a valid File-Handle re

Re: [PHP-DB] cites/states data

2001-06-30 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Jaskirat) wrote: > I am creating a database driven php page for which I need to have a database > of > US and Canadian states and cities in the back end. > Is there some place on the web where I can get such data in the reusable > form and Yo