RE: [PHP-DB] Convertion Types

2001-04-07 Thread Fernando Buitrago

Thanks, Just tha I need.

Regards.

Fer



-- 
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 administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] headers

2001-04-07 Thread Sharmad Naik

When ever i add headers in my pages i get the following errors 
Can anybody tell me what's wrong?

Warning: Cannot add header information - headers already sent by (output started
 at /usr/src/apache_1.3.14/web/server/apache/htdocs/searchdisplay.php:4) in /usr
/src/apache_1.3.14/web/server/apache/htdocs/searchdisplay.php on line 6

-Sharmad
-- 
The secret of the universe is @*!'^#+ NO CARRIER
___  _  _  _
|_|_||_||_||\/||_|| \
_|| || || \|  || ||_/

-- 
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 administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Re: PostgreSQL versus MySQL

2001-04-07 Thread Jon Valvatne

On the contrary, MySQL is much better at handling table crashes and data corruption 
than PostgreSQL is. What you may have heard is that due to lack of transaction 
support, critical data may be lost "in transit" from your application to the database, 
in the event of a system crash or a dropped connection. Well, guess what? MySQL now 
supports transactions in its latest release. Using transactions is probably not really 
needed though, unless your data is critical, such as credit card numbers.

As for a full comparison between the two, I think the bottom line is that MySQL is 
slightly more light-weight, but easier to use and faster than PostgreSQL. So if you're 
looking for a database for a relatively noncritical web application, I'd say go with 
MySQL, especially since that's what you already have experience with.

One of the upcoming features in MySQL I'm really looking forward to is query caching, 
which is a great feature for web applications.

Jon Valvatne

 Can someone outline the differences between the two? I am partial to MySQL
 from experience but want to get a good view of why one is better than the
 other.
 
 Also, I've heard that you will lose data with MySQL if a system failure
 should occur.
 
 Thanks.
 
 Matt



--
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 administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] headers

2001-04-07 Thread Johannes Janson

Hi,

you can't have ANY output whatsoever before adding a
header. Even whitespaces before the opening ?php-tag
are not possible. You also could turn "output_buffering"
"ON" in your php.ini. But your ISP has to have them same
setting and I don't know about disadvantages. So go
with the first solution.

Johannes

"Sharmad Naik" [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 When ever i add headers in my pages i get the following errors
 Can anybody tell me what's wrong?

 Warning: Cannot add header information - headers already sent by (output
started
  at /usr/src/apache_1.3.14/web/server/apache/htdocs/searchdisplay.php:4)
in /usr
 /src/apache_1.3.14/web/server/apache/htdocs/searchdisplay.php on line 6

 -Sharmad
 --
 The secret of the universe is @*í!'ñ^#+ NO CARRIER
 ___  _  _  _
 |_|_||_||_||\/||_|| \
 _|| || || \|  || ||_/

 --
 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 administrators, e-mail: [EMAIL PROTECTED]




-- 
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 administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] ADD A PROVEN LEAD SYSTEM FOR EXPLOSIVE GROWTH

2001-04-07 Thread explodeyoursales2822



PRE-QULIFIED NETWORK MARKETER LEADS FOR YOUR BUSINESS!
SALE PRICES ALL THIS WEEK!
SHARE WITH YOUR ENTIRE DOWNLINE FOR GUARANTEED SUCCESS!

CHECK OUT OUR SITE AND LET US KNOW WHAT WE CAN DO TO HELP YOU SUCCEED!!


http://www.geocities.com/betterleadsthanever




**
THIS EMAIL COMPLIES WITH ALL REGULATIONS.  TO BE REMOVED SIMPLY
EMAIL [EMAIL PROTECTED] FOR IMMEDIATE REMOVAL FROM ANY
FUTURE EMAILS FROM OUR COMPANY.
**

-- 
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 administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] headers

2001-04-07 Thread Corin Rathbone

You need to put the headers before any output has been sent to the user, not
line on line 6, line 2 if possible. This includes spaces or blank lines
before the start of your php.
e.g. Here is script that creates a simple image:
?php
header ("Content-type: image/png");
$im = @ImageCreate (200, 200) or die ("Cannot Initialize new GD image
stream");
$background_color = ImageColorAllocate ($im, 00, 00, 00);
$text_color = ImageColorAllocate ($im, 233, 14, 91);
ImageString ($im, 90, 20, 20, "Hello", $text_color);
ImagePng ($im);
?

Regards,
Corin Rathbone
[EMAIL PROTECTED]

P.S. If you use the script you need the GD Image librays installed and
enabled.


-Original Message-
From: Sharmad Naik [mailto:[EMAIL PROTECTED]]
Sent: 07 April 2001 08:16
To: [EMAIL PROTECTED]
Subject: [PHP-DB] headers


When ever i add headers in my pages i get the following errors
Can anybody tell me what's wrong?

Warning: Cannot add header information - headers already sent by (output
started
 at /usr/src/apache_1.3.14/web/server/apache/htdocs/searchdisplay.php:4) in
/usr
/src/apache_1.3.14/web/server/apache/htdocs/searchdisplay.php on line 6

-Sharmad
--
The secret of the universe is @*!'^#+ NO CARRIER
___  _  _  _
|_|_||_||_||\/||_|| \
_|| || || \|  || ||_/

--
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 administrators, e-mail: [EMAIL PROTECTED]


-- 
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 administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] using LIMIT

2001-04-07 Thread Sharmad Naik

On Fri, Apr 06, 2001 at 02:15:34PM +0300, Dainius Vaskelis wrote:

 I suppose that you are using MySQL (because of LIMIT operator in SQL query)
I m using PostgreSql

 So:
  In the second query i write a query whereby i say
  $result=pg_Exec($database,"SELECT mem_id,name from search LIMIT $count");
  Now here i display the the first 10(say $count=10) records.
  Now I know to display the other records i can say
  $result=pg_Exec($database,"SELECT mem_id,name from search LIMIT
 $count,$count");
  but what condition to give to display pages of more than $count records
  i.e how do i give for next  existing page.
 
 LIMIT operator has two parameters: amount of records of result, offset in
 result.
 
 So in order to paginate your output you need such scheme:
 
 $count = 10;
 $offset = 0;
 loop begin
 ...
 $result=pg_Exec($database,"SELECT mem_id,name from search LIMIT
 $count,$offset");
 $offset += $count;
 ...
 loop end
 
What shall the loop be like,i mean the condition for terminating the search.
 
 If you want to use this to make output as search engines do (output first 10
 recs on the first page, and output links of other pages), so you need to
 modify a litle bit. You need to pass by parameters page no, in other pages
 link:
 
 $count = 10;
 $offset = 0
 if is_set(page_no) {
 $offset = $page_no * $count;
 }
 
What is page_no here and doesn't $offset get overidden here

 ...
 $result=pg_Exec($database,"SELECT mem_id,name from search LIMIT
 $count,$offset");
 ...
 
 Hope it'll help you. Good luck.
I was of great help but i want more help or URL or atleast a practical reference on 
this.
Pls if possible look at the forms

Regards,
-- 
The secret of the universe is @*!'^#+ NO CARRIER
___  _  _  _
|_|_||_||_||\/||_|| \
_|| || || \|  || ||_/


HTML
BODY
?php
echo("$mem_id \n");
$count=10;
$offset=0;
$database=pg_connect("dbname=search user=pro");

if is_set(page_no)
{
$offset=$page_no*$count;
}
while(echo("INPUT TYPE=SUBMIT VALUE=Submit NAME=Submit");){
   $result=pg_Exec($database,"SELECT * from search ".
   "where acc_no='$mem_id' LIMIT $count,$offset");
   for ( $i=0 ; $i  pg_NumRows($result) ;$i++)
{
 echo pg_Result($result,$i,0);echo"\t";
 echo pg_Result($result,$i,1);echo"\t";
 echo pg_Result($result,$i,2);echo"\t"; 
 echo pg_Result($result,$i,3);echo"\t";
 echo "BR";
}
$offset+=$count;
}
?
/BODY
/HTML


-- 
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 administrators, e-mail: [EMAIL PROTECTED]


Re: [PHP-DB] Re: PostgreSQL versus MySQL

2001-04-07 Thread The Hermit Hacker

 As for a full comparison between the two, I think the bottom line is
 that MySQL is slightly more light-weight, but easier to use and faster
 than PostgreSQL. So if you're looking for a database for a relatively
 noncritical web application, I'd say go with MySQL, especially since
 that's what you already have experience with.

tim perdue recently negated this whole 'speed' argument with the
Sourceforge migration ... if you are planning on having a low-hit-rate web
site, go with MySQL, but as soon as you get into concurrent users, MySQL's
performance drops like a rock ...

See the numbers that Tim ran to compare the two:

http://www.phpbuilder.com/columns/tim20001112.php3

 One of the upcoming features in MySQL I'm really looking forward to is
 query caching, which is a great feature for web applications.

Something that PostgreSQL has always done ... glad they are starting to
catch up ...


-- 
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 administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] ODBC, parse error

2001-04-07 Thread Fernando Buitrago

Hello, PHP turn me crazy, I'm triyong to undertand what happend here.

?
  $conn = odbc_connect("encuneweb","","");
  $cadena = "SELECT * FROM PERSONAS WHERE IdPersona = '$v_IdPersona'";
  result2 = odbc_exec($conn,$cadena);
  close($conn);
?

The parse error apear in line: odbc exec.
I'd try with odbc_execute and odbc_prepare too.

Thanks.

Fer



-- 
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 administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Encode/Decode Secure Enough?

2001-04-07 Thread Jeff Oien

Are encode and decode secure enough for storing credit
card numbers on a Web server?
Jeff Oien

-- 
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 administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Encode/Decode Secure Enough?

2001-04-07 Thread Rasmus Lerdorf

No

On Sat, 7 Apr 2001, Jeff Oien wrote:

 Are encode and decode secure enough for storing credit
 card numbers on a Web server?
 Jeff Oien

 --
 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 administrators, e-mail: [EMAIL PROTECTED]



-- 
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 administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Forms : Validating user input is integer

2001-04-07 Thread Manuel Lemos

Hello boclair,

On 05-Apr-01 01:58:24, you wrote:

I have a problem with a user input in a form required to be an
integer, creating a variable for a mysql query.

I have instances where integer, 0, is being typed as letter,o.

The last discussion of validating the input was
http://marc.theaimsgroup.com/?l=php-dbm=97207172003983w=2

There it was suggested that the only way to validate the input was
using javascript.  I have a case where clients have disabled
javascript.

I tried fiddling with is_int($input) but of cause it does not serve
this purpose.

Does anybody know if such validation can be done server side or
definitely must be done client side?

You may want to try this PHP form generation and validation class that does
exactly what you need and more.

http://phpclasses.UpperDesign.com/browse.html/package/1


It does both client and server side validation.  For the client side it
uses the isNaN(parseInt(value)) Javascript functions.  For the server side
it uses the strcmp($value,strval(intval($value))) PHP functions .


Regards,
Manuel Lemos

Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED]
--
E-mail: [EMAIL PROTECTED]
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--


-- 
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 administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] using LIMIT

2001-04-07 Thread Manuel Lemos

Hello Sharmad,

On 06-Apr-01 08:33:54, you wrote:

Hi,
   Thanks for firstly helping me out with the prevoius query.
   I have a database with mem_id(int) and name(text) as its fields.
   In the first form (HTML) ,I take mem_id,name and count(used for LIMIT)
   from the browser.

   In the second query i write a query whereby i say
$result=pg_Exec($database,"SELECT mem_id,name from search LIMIT $count");
   Now here i display the the first 10(say $count=10) records.
   Now I know to display the other records i can say   
$result=pg_Exec($database,"SELECT mem_id,name from search LIMIT
$count,$count");
   but what condition to give to display pages of more than $count records
   i.e how do i give for next  existing page.

What you need to do is to pass to the LIMIT clause the $first and $limit
values where the $first is the number of the page of results you want to
display times the number records you want to see per page which is also the
$limit.

Maybe you want to look at Metabase which is a PHP database abstraction page
that lets you specify the range of rows that you want to retrieve pretty
much like the LIMIT clause, except that it works well in all supported
databases including PostgreSQL versions that did not support the LIMIT
clause.

http://phpclasses.UpperDesign.com/browse.html/package/20

With Metabase you may use this other PHP query result table display class
that is able to display query result rows in HTML tables with optional
links to go to the next, previous, first, last, etc...  result pages.  It
uses MetabaseSetSelectedRowRange($database,$first,$limit) function to
choose the rows that it displays in each page.


Regards,
Manuel Lemos

Web Programming Components using PHP Classes.
Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED]
--
E-mail: [EMAIL PROTECTED]
URL: http://www.mlemos.e-na.net/
PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
--


-- 
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 administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Still not - Display data begin with A

2001-04-07 Thread Joe Brown

Put the percent symbol inside of the single quotes:

$result = mysql_query("SELECT * FROM mydata WHERE name like '$begin%'
",$db);

"Naga Sean" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 It still not working
 I want to get the result of people with the first later is "A" in my
database

 Here is my syntax :

 $result = mysql_query("SELECT * FROM mydata WHERE name like
'$begin'%",$db);

 the $begin is from the URL link

 www.sample.com/name?begin=a


 Thanks


 --- "Frank M. Kromann" [EMAIL PROTECTED]
  wrote:
 wyoy could use a SQL statement like this:
 
 select * from myTable where LastName like "A%"
 
 - Frank
 
  Guys,
 
  How to view the result from the table.
  If I only want to display persons begin with letter A in the front.
 
 
 
  _
  www.kaskus.com - FREE EMAIL SERVICE
 
  --
  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 administrators, e-mail:
[EMAIL PROTECTED]
 
 
 

 _
 www.kaskus.com - FREE EMAIL SERVICE

 --
 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 administrators, e-mail: [EMAIL PROTECTED]




-- 
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 administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Display data begin with A

2001-04-07 Thread Naga Sean

Okay it's working now..
How if I want to display all the data begin with NUMBERS. like "1,2,3,...,0"







--- "Frank M. Kromann" [EMAIL PROTECTED]
 wrote:
wyoy could use a SQL statement like this:

select * from myTable where LastName like "A%"

- Frank

 Guys,
 
 How to view the result from the table.
 If I only want to display persons begin with letter A in the front.
 
 
 
 _
 www.kaskus.com - FREE EMAIL SERVICE
 
 -- 
 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 administrators, e-mail: [EMAIL PROTECTED]
 
 


_
www.kaskus.com - FREE EMAIL SERVICE

-- 
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 administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] RE : [PHP-DB] Forms : Validating user input as integer

2001-04-07 Thread boclair

Manuel,

Manuel Lemos [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
| Hello boclair,
|
| On 05-Apr-01 01:58:24, you wrote:
|
| I have a problem with a user input in a form required to be an
| integer, creating a variable for a mysql query.
|
| I have instances where integer, 0, is being typed as letter,o.
|
| You may want to try this PHP form generation and validation class
that does
| exactly what you need and more.
|
| http://phpclasses.UpperDesign.com/browse.html/package/1
|
|
| It does both client and server side validation.  For the client side
it
| uses the isNaN(parseInt(value)) Javascript functions.  For the
server side
| it uses the strcmp($value,strval(intval($value))) PHP functions .
|
|
| Regards,
| Manuel Lemos
|
| Web Programming Components using PHP Classes.
| Look at: http://phpclasses.UpperDesign.com/?[EMAIL PROTECTED]
| --
| E-mail: [EMAIL PROTECTED]
| URL: http://www.mlemos.e-na.net/
| PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp

I downloaded the files and am studying them.

Certainly comprehensive.

Many thanks

Tim Morris


-- 
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 administrators, e-mail: [EMAIL PROTECTED]