[PHP-DB] how to lock multiple row in Oracle Db?

2005-12-07 Thread Rasim �EN
Hi friends , my code like this $sql=SELECT mid,substr(ROWID,0,100) as nROWID,MEMBER_ID, NAME, SURNAME, E_MAIL, SUBJECT, MAIL_BODY, to_char(DATE_CREATED,'DD.MM. HH24:MI:SS') as DATE_CREATED, RETRY, PRIORITY, E_MAIL_FROM, RECEIVER_MEMBER_ID, RECEIVER_NAME, RECEIVER_SURNAME, MAIL_TYPE,

[PHP-DB] SQL Insert INTO question

2005-12-07 Thread geekgirl1
First time poster. This is the problem. I want to add the value of $_POST[review] to the reviews table where the unique id from the reviews table equals the review id on my form. The statement below does not work. Should I use UPDATE instead? INSERT INTO reviews (review_txt)

RE: [PHP-DB] problem of retrieving urls from mysql

2005-12-07 Thread Edward Gray
actually, you may want to check the source of the page. if the url does not start with http://; (or https, or ftp, etc.), browsers will assume the link is on the current server. how are you storing the urls? as full urls, as domain/path/file.htm, ? if all of your urls should start with

RE: [PHP-DB] problem of transmiting variabl into another page?

2005-12-07 Thread Ford, Mike
On 02 December 2005 13:06, Bastien Koert wrote: ?php for ($j=ord('A'); $j = ord('Z'); $j++) { echo | ba href='alpha.php?artist=.chr($j).'.chr($j)./a/b ; } ? You need to use the ORD function to get the numerical ascii equivalent of the letter and the CHR function to go back the

Re: [PHP-DB] problem of retrieving urls from mysql

2005-12-07 Thread Mohamed Yusuf
I am getting link from visitor using form, that means I don't have control what they would type. e.g they may type http://www.suggestedlink.com/myfav.wav, www.suggestedlink.com/myfav.ram and http://suggestedlink.com/myfav.mp3 or so I am looking general version which can handle all. and on top of

Re: [PHP-DB] problem of retrieving urls from mysql

2005-12-07 Thread Edward Gray
you should then check the strings provided by your users. you can do this before or after the link is added to your database. use a regex to verify that the url provided is a full url (starting with 'http://', etc.). if it is not, then prepend 'http://'. i would recommend doing this before

[PHP-DB] Error's management : php-pgsql.

2005-12-07 Thread David BOUCHE
Hello, My goal : obtain the error message if the connection fail. ## my code : ?php $cnxString = host=localhost port=5432 dbname=toto user=atlante password=aiThoo3g; $pgsql_conn = pg_connect($cnxString, PGSQL_CONNECT_FORCE_NEW); if ($pgsql_conn) { print Connexion réussie à : .

RE: [PHP-DB] Error's management : php-pgsql.

2005-12-07 Thread Bastien Koert
try if (!$pgsql_conn = pg_connect($cnxString, PGSQL_CONNECT_FORCE_NEW)) { print Connexion réussie à : . pg_host($pgsql_conn) . br/\n; } else { echo pg_last_notice($pgsql_conn); exit; } bastien From: David BOUCHE [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Error's management

Re: [PHP-DB] Google Style Search Results

2005-12-07 Thread Joseph Crawford
why not use substr? $preview = substr($string, 0, 50) .'...'; it will probably cut off in the middle of a word, but you can use strpos and check to see if the char is a space to get to the point you want. -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. 1-802-671-2021

Re: [PHP-DB] Google Style Search Results

2005-12-07 Thread dpgirago
It's possible that the keywords wouldn't be in the first X numbers of characters. |-+-- | | | | | | | | Joseph

Re: [PHP-DB] Error's management : php-pgsql.

2005-12-07 Thread David BOUCHE
Hello, i'm ok with this. But how do you explain the example on php.net ? And how can I get the error message ? The same error message that i've got in my logs : Unable to connect to PostgreSQL server: FATAL: la base de données «toto» n'existe pas* *(In english : the «toto» database doesn't

Re: [PHP-DB] Google Style Search Results

2005-12-07 Thread Philip Hallstrom
why not use substr? $preview = substr($string, 0, 50) .'...'; it will probably cut off in the middle of a word, but you can use strpos and check to see if the char is a space to get to the point you want. It's possible that the keywords wouldn't be in the first X numbers of characters.

Re: [PHP-DB] how to lock multiple row in Oracle Db?

2005-12-07 Thread Christopher Jones
Rasim ÞEN wrote: Hi friends , my code like this $sql=SELECT mid,substr(ROWID,0,100) as nROWID,MEMBER_ID, NAME, SURNAME, E_MAIL, SUBJECT, MAIL_BODY, to_char(DATE_CREATED,'DD.MM. HH24:MI:SS') as DATE_CREATED, RETRY, PRIORITY, E_MAIL_FROM, RECEIVER_MEMBER_ID, RECEIVER_NAME,