|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
php-general-digest-help_at_lists.php.net
Date: Sun Jul 28 2002 - 09:15:01 CDT
php-general Digest 28 Jul 2002 14:15:01 -0000 Issue 1491
Topics (messages 110019 through 110051):
PHP/MySQL Search Engine Query Question
110019 by: Paul Maine
110026 by: Naintara Jain
How do I show the sourse code?
110020 by: Øystein Håland
110022 by: Bob Lockie
110027 by: Michael Sims
110045 by: JJ Harrison
Re: php 'mail()' security
110021 by: Bob Lockie
110025 by: Dennis Gearon
110036 by: Justin French
Re: Extra spacing with <br> in HTML
110023 by: Jason Stechschulte
110034 by: Justin French
110035 by: Justin French
110050 by: Kevin Breit
110051 by: Justin French
setcookie question
110024 by: Gaylen Fraley
110029 by: JJ Harrison
running php with .html files?
110028 by: Henry
110049 by: Michael Sims
Site Search
110030 by: Michael Hall
Re: High Resolution Images
110031 by: Justin French
Re: failure notice
110032 by: Justin French
Speed issues.
110033 by: Yves Vrancken
110037 by: Justin French
110038 by: Yves Vrancken
110041 by: Bas Jobsen
need help reg. User Accounts
110039 by: umesh
file_name
110040 by: Saci
cant send data from a website to another
110042 by: kju
110044 by: Justin French
Self Answer for file upload
110043 by: Saci
Checking Insert to Postgre, whats wrong?
110046 by: Bård Magnus Fauske
110047 by: Yasuo Ohgaki
Help reg. create user and allocate space
110048 by: umesh
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
I am currently working on a website that is implemented using PHP and MySQL.
The site currently has a simple search engine that allows a shopper to type
in a search string that is stored in $search. For example, if a shopper
types in 1972 Ford Mustang
$string ="1972 Ford Mustang"
Using the following SQL statement:
SELECT * FROM whatevertable WHERE whatevercolumn LIKE '%$search%
Records are returned that have this exact string and in this exact order
(I'm aware a wild card character is included on the front and back of the
string).
My desire is to be able to logically AND each token of the search together
independent or the order of the tokens.
I want to return all records that have Mustang AND 1972 AND Ford.
Since a shopper inputs the search string in advance I don't know how many
tokens will be used.
I would appreciate any suggestions.
Regards,
Paul
attached mail follows:
You can use explode/split functions on the search parameters - that will
give u an array with each search token indexed individually. Suppose the
search input was 'abc xyz'
$strsearch = "abc xyz";
$search=explode(" ",$strsearch);
your array "search" will contain
$search[0]=abc
$search[1]=xyz
Now, you can iterate through the array members and create a SQL string out
of it, join the elements with "LIKE" and "AND".
so that you have something like
SELECT * FROM whatevertable WHERE whatevercolumn LIKE '%$search[0]% AND
whatevercolumn LIKE '%$search[1]%
Since you won't know how many search input 'tokens' will be searched on: Use
a loop to create the SQL statement. You can also use the implode() function
to create the SQL.
Textual searches can be optimised somewhat by creating the appropriate
indexes (refer to the MySQL manual).
-Naintara
-----Original Message-----
From: php-general-return-110019-naintara=del6.vsnl.net.in
lists.php.net
[mailto:php-general-return-110019-naintara=del6.vsnl.net.in
lists.php.ne
t]On Behalf Of Paul Maine
Sent: Sunday, July 28, 2002 8:02 AM
To: PHP PHP
Subject: [PHP] PHP/MySQL Search Engine Query Question
I am currently working on a website that is implemented using PHP and MySQL.
The site currently has a simple search engine that allows a shopper to type
in a search string that is stored in $search. For example, if a shopper
types in 1972 Ford Mustang
$string ="1972 Ford Mustang"
Using the following SQL statement:
SELECT * FROM whatevertable WHERE whatevercolumn LIKE '%$search%
Records are returned that have this exact string and in this exact order
(I'm aware a wild card character is included on the front and back of the
string).
My desire is to be able to logically AND each token of the search together
independent or the order of the tokens.
I want to return all records that have Mustang AND 1972 AND Ford.
Since a shopper inputs the search string in advance I don't know how many
tokens will be used.
I would appreciate any suggestions.
Regards,
Paul
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
attached mail follows:
I have seen on some of the script-sites around some nice ways of presenting the source code. Often in nice colors. So, the natural question is: how is that done (cause I don't think anyone has the patience to put < and > around all the <>)
attached mail follows:
>I have seen on some of the script-sites around some nice ways of presenting >the source code. Often in nice colors. So, the natural question is: how is >that done (cause I don't think anyone has the patience to put < and > >around all the <>)
Probably some PHP wrapper that highlights the right portions of the code and sends it back. I don't know where you can grab one from but it shouldn't be too difficult to make your own.
attached mail follows:
On Sun, 28 Jul 2002 03:41:19 +0200, you wrote:
>I have seen on some of the script-sites around some nice ways of presenting >the source code. Often in nice colors. So, the natural question is: how is >that done (cause I don't think anyone has the patience to put < and > >around all the <>)
http://www.php.net/manual/en/function.highlight-file.php
attached mail follows:
research the php function htmlspecialchars().
I replaces < with < and > with > etc.
-- JJ Harrison webmastertececo.com www.tececo.com
I often get confused with < and > so they may be in the wrong order but I am sure you get the idea.
"ØYstein HåLand" <ha
ematte.se> wrote in message news:20020728014252.16566.qmail
pb1.pair.com... > I have seen on some of the script-sites around some nice ways of presenting > the source code. Often in nice colors. So, the natural question is: how is > that done (cause I don't think anyone has the patience to put < and > > around all the <>) > >
attached mail follows:
On Sat, 27 Jul 2002 17:31:16 -0700, Dennis Gearon wrote:
>How can I make my form which entered by a user, then sent to a company >employee, secure, not vulnerable attack? >-- >----------------------------------------------------------------- >Joy is just a thing (to be).. raised on, >Love is just the way to Live and Die, > John Denver. >----------------------------------------------------------------- >He lost a friend, but kept his Memory (also John Denver), > Thank you...John Corones...my friend always. >----------------------------------------------------------------- >Look lovingly upon the present, >for it holds the only things that are forever true. >----------------------------------------------------------------- > Sincerely, Dennis Gearon (Kegley)
Setup SSL on your web server.
attached mail follows:
What I meant was, how to sanitize the input on the forms so that malicious stuff cannot be put as commands, etc. in the email address, or body, or 'extra' field of the 'mail()' function in PHP.
-- ----------------------------------------------------------------- Joy is just a thing (to be).. raised on, Love is just the way to Live and Die, John Denver. ----------------------------------------------------------------- He lost a friend, but kept his Memory (also John Denver), Thank you...John Corones...my friend always. ----------------------------------------------------------------- Look lovingly upon the present, for it holds the only things that are forever true. ----------------------------------------------------------------- Sincerely, Dennis Gearon (Kegley)
attached mail follows:
- strip_tags() will remove HTML and PHP code from a string
- there is a great function set which validates email address' to ensure the email address is in the correct format available from killersoft: http://killersoft.com/modules.php?op=modload&name=News&file=article&sid=2
- ensuring there are no newlines (\n) in the email address, subject, etc etc will ensure that they aren't sneaking another email header into an existing header.
Justin French
on 28/07/02 1:54 PM, Dennis Gearon (gearond
cvc.net) wrote:
> What I meant was, how to sanitize the input on the forms so that > malicious stuff cannot be put as commands, etc. in the email address, or > body, or 'extra' field of the 'mail()' function in PHP.
attached mail follows:
On Sat, Jul 27, 2002 at 08:08:34PM -0400, Kevin Breit wrote: > Lets say I have > > <ul> > <li>Blar</li> > </ul> > > ln2br() will crunch that and put out: > <ul><br /> > <li>Blar</li><br /> > </ul><br /> > > That creates a lot of white space when that HTML is rendered. How do I > tell PHP not to put line breaks in a situation like that?
There might be an easier way, but you might just have to write your own code for this. Something along the lines of: (completely untested)
<?php $line = ereg_replace("(^li|^ul|^ol)>\n", "<br />\n", $line); ?>
-- Jason Stechschulte stechypisco.com http://www.ypisco.com -- The brain is a wonderful organ; it starts working the moment you get up in the morning, and does not stop until you get to school.
attached mail follows:
I *think* you've got a typo -- you've said ln2br instead of nl2br i think.
Aaaannny way, you can't modify WHAT php does in nl2br, but you can do something to the resulting code, like replacing "</li><br />" with "</li>":
<? $original = "<ul><li>Blar</li></ul>"; $new = nl2br($original); $new = str_replace('</li><br />', '</li>', $new); ?>
Either that, or write your own version of nl2br which ignores </li> (*no way* I'd both doing this!!!!)
Justin French
attached mail follows:
on 28/07/02 12:53 PM, Jason Stechschulte (stech
ypisco.com) wrote:
> There might be an easier way, but you might just have to write your own > code for this. Something along the lines of: (completely untested) > > <?php > $line = ereg_replace("(^li|^ul|^ol)>\n", "<br />\n", $line); > ?>
Definately an easier way (IMHO) -- just let nl2br() do what it does, then replace the problematic </li><br /> with just a <br />:
<? $original = "<ul><li>Blar</li></ul>"; $new = nl2br($original); $new = str_replace('</li><br />', '</li>', $new); ?>
Justin
attached mail follows:
On Sun, 2002-07-28 at 04:04, Justin French wrote: > I *think* you've got a typo -- you've said ln2br instead of nl2br i think.
Doh! You got that right.
> Aaaannny way, you can't modify WHAT php does in nl2br, but you can do > something to the resulting code, like replacing "</li><br />" with "</li>": > > <? > $original = "<ul><li>Blar</li></ul>"; > $new = nl2br($original); > $new = str_replace('</li><br />', '</li>', $new); > ?>
Hmmm..you've got it backwards, but I see what you mean. I'll tool around with it tonight.
Thanks for the suggestion.
Kevin
-- Kevin Breit <mrproperximian.com>
attached mail follows:
on 29/07/02 12:02 AM, Kevin Breit (mrproper
ximian.com) wrote:
>> Aaaannny way, you can't modify WHAT php does in nl2br, but you can do >> something to the resulting code, like replacing "</li><br />" with "</li>": >> >> <? >> $original = "<ul><li>Blar</li></ul>"; >> $new = nl2br($original); >> $new = str_replace('</li><br />', '</li>', $new); >> ?> > > Hmmm..you've got it backwards, but I see what you mean. I'll tool > around with it tonight.
I don't think I did....
Manual Quote:
Description mixed str_replace ( mixed search, mixed replace, mixed subject)
So, we search for </li><br /> (the problem being the unnecessary <br />, and replace it with </li>.
Unless I'm misunderstanding the question/problem.
Justin
attached mail follows:
I need to create a cookie that is accessible from more than 1 application, but on the same server. What would be the proper syntax? What I tried was setcookie ("myCookie","$cookie_value",$timeToExpire,'/'); Right or wrong or impossible? Should I not have used the "/"? Thanks.
-- Gaylen PHP KISGB v4.0.5 Guest Book http://www.gaylenandmargie.com/phpwebsite/ PHP KISSQ v1.0 Stock Quote http://www.gaylenandmargie.com/phpwebsite
attached mail follows:
If the different applications are on the same domain/ip you should use this: ("myCookie","$cookie_value",$timeToExpire);
note the missing parameter at the end
-- JJ Harrison webmastertececo.com www.tececo.com
"Gaylen Fraley" <gfraley5
earthlink.net> wrote in message news:20020728032422.58045.qmail
pb1.pair.com... > I need to create a cookie that is accessible from more than 1 application, > but on the same server. What would be the proper syntax? What I tried was > setcookie ("myCookie","$cookie_value",$timeToExpire,'/'); Right or wrong or > impossible? Should I not have used the "/"? Thanks. > > -- > Gaylen > PHP KISGB v4.0.5 Guest Book http://www.gaylenandmargie.com/phpwebsite/ > PHP KISSQ v1.0 Stock Quote http://www.gaylenandmargie.com/phpwebsite > > >
attached mail follows:
Hi All,
I'm sure I saw a posting on this subject a month ago so please excuse me for not paying attention the first time ;-|
I have a php script that I wish to execute but I want to put it in index.html (not index.php)
I know there is a solution involving configuration files in either the directory wher the file is held or specifically for the server. (Unfortunately I don't have access to the conf files for the server because I'm currently using a shared serever from an ISP).
Any help is greatly appreciated. Even pointers in the right direction would be useful.
TIA
Henry
attached mail follows:
On Sun, 28 Jul 2002 08:18:40 +0100, you wrote:
>Hi All, [...] >I have a php script that I wish to execute but I want to put it in >index.html (not index.php) > >I know there is a solution involving configuration files in either the >directory wher the file is held or specifically for the server. >(Unfortunately I don't have access to the conf files for the server because >I'm currently using a shared serever from an ISP). [...]
You didn't say what web server you are using, so I will assume it's Apache. If your server is configured to allow .htaccess files to override global settings, you should be able to create one in your directory and add:
AddType application/x-httpd-php .html
attached mail follows:
I'm wondering what is a good general approach to enabling site-wide searches on any topic on a 100% PHP-powered portal-type site for a tertiary institution (yet to be built). Most if not all content will be contained in a database, spread across potentially many different tables.
How can all this stuff be searched efficiently and effectively to hopefully find the punter what they're looking for? Searching the sometimes lengthy "main content" fields (eg. an academic paper) in every table of the entire database for every search doesn't seem like the way to go. But apart from attempting to add some kind of subjective "search term" fields to the data, I can't see how else it can be done.
TIA
----------------------------------------------------
MICHAEL HALL Web Development Officer
Batchelor Institute of Indigenous Tertiary Education
Work: mick.hall
nt.gov.au (08) 8951 8314
Home: ninti
ninti.com (08) 8953 1442
----------------------------------------------------
attached mail follows:
on 28/07/02 1:48 AM, oscarfm
cantv.net (oscarfm
cantv.net) wrote:
> Justin, > > I did what you said, just uploaded the file and downloaded it again, and > the weirdest thing is happening. When I Form-Upload/FTP-Download it, I can > see it on my local computer, it opens everywhere. Now, when I try to see it > from the web site it is uploaded (http://wwwwebsite/file.jpg), it does not > display. mmm Any suggestions?
Is the JPEG in CMYK or RGB format as you upload? Pretty sure only RGB images work on browsers, whereas JPEGs work as CMYK as well...
If you can FTP download it AND open it in Photoshop et al, then the issue is the file compatibility with the browser, probably due to CMYK, resolution, or something else.
Justin French
attached mail follows:
on 28/07/02 5:24 AM, Miguel Cruz (mnc
un.u.nu) wrote:
> Is this for real? Rackspace hosts an awful lot of good-hearted people > (including myself). Is there a specific reason why the entire ISP's > customer base has been blocked from posting to php-general? I guess I have > to give up participating on the PHP list... > > miguel
Will be sorry to see you go if that is the case Miguel.
Justin French
attached mail follows:
Greetings,
I am new to PHP and trying to implement some PHP and MySQL on my website. My website has a lot of tables and inside some of those tables, I want to display information that is drawn out of the MySQL database using PHP. I was wondering what goes faster:
(A). Building the whole page normally up in HTML, doing the usual <table> <td> and so forth, and then inside the <td> calling up the PHP in order to display the information. For example: <td> <?php ...... ?> </td>
(B). Doing everything in the PHP document, also the 'building' of the tables, and then including the PHP script in the main page. For example using printf("<tr><td> and so forth.
Thanks,
Yves Vrancken
attached mail follows:
I haven't noticed ANY performance hit by skipping in and out of PHP and HTML when it suits me.
I imagine there *might* be a slight performance hit if you were building a LOT of table information with print or echo or printf, but the general answer to your question is usually "whatever suits you better".
You could run some comparison tests with a microtimer to see what happens...
I doubt on a 50-100K HTML page that you could notice the difference, unless the site or server got S**TLOADS of hits.
Justin French
on 28/07/02 5:56 PM, Yves Vrancken (webmaster
silvenmyst.com) wrote:
> Greetings, > > I am new to PHP and trying to implement some PHP and MySQL on my website. My > website has a lot of tables and inside some of those tables, I want to > display information that is drawn out of the MySQL database using PHP. I was > wondering what goes faster: > > (A). Building the whole page normally up in HTML, doing the usual <table> > <td> and so forth, and then inside the <td> calling up the PHP in order to > display the information. For example: <td> <?php ...... ?> </td> > > (B). Doing everything in the PHP document, also the 'building' of the > tables, and then including the PHP script in the main page. For example > using printf("<tr><td> and so forth. > > Thanks, > > Yves Vrancken > >
attached mail follows:
I didn't expect it to make too much of a difference. Thank you for your answer.
Yves Vrancken
"Justin French" <justin
indent.com.au> wrote in message
news:B969E5D0.B7BA%justin
indent.com.au...
> I haven't noticed ANY performance hit by skipping in and out of PHP and
HTML
> when it suits me.
>
> I imagine there *might* be a slight performance hit if you were building a
> LOT of table information with print or echo or printf, but the general
> answer to your question is usually "whatever suits you better".
>
> You could run some comparison tests with a microtimer to see what
happens...
>
> I doubt on a 50-100K HTML page that you could notice the difference,
unless
> the site or server got S**TLOADS of hits.
>
>
> Justin French
>
>
>
> on 28/07/02 5:56 PM, Yves Vrancken (webmaster
silvenmyst.com) wrote:
>
> > Greetings,
> >
> > I am new to PHP and trying to implement some PHP and MySQL on my
website. My
> > website has a lot of tables and inside some of those tables, I want to
> > display information that is drawn out of the MySQL database using PHP. I
was
> > wondering what goes faster:
> >
> > (A). Building the whole page normally up in HTML, doing the usual
<table>
> > <td> and so forth, and then inside the <td> calling up the PHP in order
to
> > display the information. For example: <td> <?php ...... ?> </td>
> >
> > (B). Doing everything in the PHP document, also the 'building' of the
> > tables, and then including the PHP script in the main page. For example
> > using printf("<tr><td> and so forth.
> >
> > Thanks,
> >
> > Yves Vrancken
> >
> >
>
attached mail follows:
Hello,
You can also find something about your questions on: http://www.php9.com/index.php/section/articles/name/PHP%20Guidelines
I had tested out by printing (repeated times): 1) echo '<br>'.$k.': hallo '.$string.', dit is het<br>'."\n"; 2) echo "<br>$k: hallo $string, dit is het<br>"."\n"; 3) ?><br><?=$k?>: hallo <?=$string?>, dit is het<br><?="\n"?><? $k=1; $string='test';
I found: The fastest way to print was 3) Second came 1) (no much difference) and the slowest way 2) (about 2 times slower).
I haven't tested printf("<tr><td>
Best regards,
Bas Jobsen
Op zondag 28 juli 2002 09:56, schreef Yves Vrancken: > Greetings, > > I am new to PHP and trying to implement some PHP and MySQL on my website. > My website has a lot of tables and inside some of those tables, I want to > display information that is drawn out of the MySQL database using PHP. I > was wondering what goes faster: > > (A). Building the whole page normally up in HTML, doing the usual <table> > <td> and so forth, and then inside the <td> calling up the PHP in order to > display the information. For example: <td> <?php ...... ?> </td> > > (B). Doing everything in the PHP document, also the 'building' of the > tables, and then including the PHP script in the main page. For example > using printf("<tr><td> and so forth. > > Thanks, > > Yves Vrancken
attached mail follows:
Hi Gurus,
I am using PHP-4.1.1 on Linux, I wanted to know the difference between "nobody" user and normal user of operating system.
This question just came to mind when, neither nobody's directory nor any entry was not found in /home or elsewhere.
Thanking you all in anticipation.
Regards
Umesh.
*****************************
Umesh A. Deshmukh.
Manas Solutions Pvt. Ltd.
umesh
manas-solutions.com
http://www.manas-solutions.com
Ph. : 91+020+4006358,4223991/92
*****************************
attached mail follows:
I'm using php 4.21 on WIN xp.
I 'm trying to work with file upload, I already read several sites who refer that php will set the variable file_name automaticly,.
I made 2 tries one on line 6 and other on line 7 of the atached code, but both does not work.
Why I receive the folowing errors, and how can I correct
Notice: Undefined index: file_name in d:\inetpub\wwwroot\impac\php\upfile.php on line 6
Successfully uploaded Notice: Undefined variable: file_name in d:\inetpub\wwwroot\impac\php\upfile.php on line 7
<HTML> <BODY> <?php if (isset($_POST['file'])){ echo "Successfully uploaded ",$_POST['file'], "<BR>\n"; echo "Successfully uploaded ",$_POST['file_name'], "<BR>\n"; echo "Successfully uploaded ",$file_name, "<BR>\n"; } else echo "unccessfully uploaded ", "<BR>\n"; phpinfo(); ?> <FORM METHOD=POST ACTION=upfile.php enctype='multipart/form-data'> <input type=hidden name='MAX_FILE_SIZE' value=200000> <INPUT TYPE=FILE NAME=file><BR> <INPUT TYPE=SUBMIT> </FORM> </BODY> </HTML>
attached mail follows:
Hi newsgroup friends, my name is mike and im qite new to php. i have one problem: i cant send date via a <form action="example.php" method="post">. so in the the php file called example, i write echo $nameofthefield, but the data isnt send, so nothing is written in the browser! what can i do?
attached mail follows:
Try
echo $_POST['nameofthefield'];
If this works, it's to do with register_globals directive in your php.ini file.
You can set it to on, which will solve your problem, or you can choose to be more secure, and write better scripts, by choosing to keep it off, as with the above line of code.
Search the archives of this list for "regisiter globals" and "new global variables", because this has been discussed over and over and over and over.
Justin
on 28/07/02 8:04 PM, kju (kju
arteq.de) wrote:
> > Hi newsgroup friends, > my name is mike and im qite new to php. > i have one problem: i cant send date via a <form action="example.php" > method="post">. > so in the the php file called example, i write echo $nameofthefield, but the > data isnt send, so nothing is written in the browser! > what can i do? > > > > >
attached mail follows:
The help other's with the same problem I made that self answer.
The tip here is to use $_FILES instead of $_POST
<HTML> <BODY> <?php if (isset($_FILES['file'])){ echo "Successfully uploaded ", "<BR>\n"; echo "File Name ",$_FILES['file']['name'], "<BR>\n"; echo "File Type ",$_FILES['file']['type'], "<BR>\n"; echo "File tmp ",$_FILES['file']['tmp_name'], "<BR>\n"; echo "File errors ",$_FILES['file']['error'], "<BR>\n"; echo "File size ",$_FILES['file']['size'], "<BR>\n"; } else echo "unccessfully uploaded ", "<BR>\n"; ?> <FORM METHOD=POST ACTION=upfile.php enctype='multipart/form-data'> <input type=hidden name='MAX_FILE_SIZE' value=200000> <INPUT TYPE=FILE NAME=file><BR> <INPUT TYPE=SUBMIT> </FORM> </BODY> </HTML>
attached mail follows:
Hello.
I use this code-snip similar to this to check if the inserted tuppel in my database was successfull: --- snip --- $OID = pg_last_oid($resultat); if($OID<0) { echo $errormessage; exit; } $query = "SELECT * FROM medlemmer WHERE oid = '$OID';"; $resultat = pg_query($dbconnection, $query);
if (!$resultat) { echo $errormessage; exit; } else { $i = 0; $medlem_id[$i] = pg_fetch_result($resultat, $i, "medlem_id"); $fornavn[$i] = pg_fetch_result($resultat, $i, "fornavn"); } pg_free_result($resultat); if (!$medlem_id[$i]) { echo $errormessage; exit; } else { $i = 0; echo $medlem_id[$i].$fornavn[$i]; } --- snip ---
But when I print the result from pg_fetch_result() to the browser (last lines above), I only get the first letter in the string $fornavn[$i] and similar strings not listed above, not the whole string. What is the reason for this? Has it something to do with the pg_last_oid()? I can't see how since this only identify the inserted row (or am I wrong?) which I select afterwards.
Thanks for answer.
Bård Magnus
attached mail follows:
Bård Magnus Fauske wrote: > But when I print the result from pg_fetch_result() to the browser (last > lines above), I only get the first letter in the string $fornavn[$i] and > similar strings not listed above, not the whole string. What is the > reason for this? Has it something to do with the pg_last_oid()? I can't > see how since this only identify the inserted row (or am I wrong?) which > I select afterwards. > > Thanks for answer. >
This is not a direct answer.
Since you are using 4.2.0 or later, you are better to use pg_status() or pg_result_status() to check these things.
i.e. You don't have to select row just to make sure row is inserted or not. It wastes lots of resource.
-- Yasuo Ohgaki
attached mail follows:
Hi Gurus,
I am using PHP-4.1.1, postgresql on Linux.
I want the following functionality, I dont know how to implement it.
Each time a new user registeres, I want to create mail account by the name he specifies and allocate him some space of the server, say 2mb.
How this is incorporated ?
Please help.
Thanking you all in anticipation.
Regards
Umesh.
*****************************
Umesh A. Deshmukh.
Manas Solutions Pvt. Ltd.
umesh
manas-solutions.com
http://www.manas-solutions.com
Ph. : 91+020+4006358,4223991/92
*****************************
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]