Re: [PHP-DB] simple issue

2006-11-22 Thread Chris Carter

Thanks Jeff, 

As I mentioned, this is just a sample code with username password db name
all changed. Thanks for your advice coz I never knew the php db archive is
searchable.


Jeffrey-2 wrote:
 
 You should be aware the the PHP-DB archives are openly available on the 
 web and searchable. Assuming you have listed your actual username, 
 password, etc, you should immediately go to your web site and change 
 your password. If possible change also your username and database name. 
 Do it now.
 
 It would not be an overly demanding task for a hacker to find your web 
 site and once she does, she has free access to your database.
 
 And in future, when sharing code on PHP-DB, which is a must if you want 
 the expert help people here can provide, always leave out or change the 
 MySQL log in info.
 
 Good luck,
 
 Jeffrey
 
 
 Chris Carter wrote:
 my code:
 
 html
 body
 
 ?
 $username=chris;
 $password=carter;
 $database=chris_phpb1;
 
 mysql_connect(localhost,$username,$password);
 @mysql_select_db($database) or die( Unable to select database);
 $query=SELECT * FROM phpbb_banlist;
 $result=mysql_query($query);
 
 if (!$result)
   {exit(Error in SQL);}
 echo tabletr;
 echo thCompanyname/th;
 echo thContactname/th/tr;
 while (odbc_fetch_row($result))
 {
   $compname=odbc_result($result,CompanyName);
   $conname=odbc_result($result,ContactName);
   echo trtd$compname/td;
   echo td$conname/td/tr;
 }
 odbc_close($conn);
 echo /table;
 ?
 
 /body
 /html
 
 My error:
 
 Fatal error: Call to undefined function: odbc_fetch_row() in
 /home/chandan/public_html/deb.php on line 19
 Companyname  Contactname
 
 Also .. I am trying this live on cPanel compiler coz I could not install
 the
 PHP thing on my localhost. I have apache-tomcat-5.5.17 which works
 perfectly
 with jsp files but I do not understand what does it take to run a php
 using
 apache.
 
 chris smith-9 wrote:
 
Chris Carter wrote:

Hi,

I am new to PHP, just trying a peace of code to access mySQL database to
fetch and show result on web page. But getting errors. Can you help me
with
this code please. Or if you have a very basic code where in I can do
some
insertion in the database.

There are hundreds of mysql + php tutorials on the 'net - do a search in 
your preferred search engine.

If you *still* can't work it out post a sample of the code you're trying 
to use and the errors you get.

-- 
Postgresql  php tutorials
http://www.designmagick.com/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

-- 
View this message in context: 
http://www.nabble.com/simple-issue-tf2683559.html#a7487209
Sent from the Php - Database mailing list archive at Nabble.com.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Just two PHP questions

2006-11-22 Thread Chris Carter

As mentioned before, I am new to php. Till now I was trying to execute the
file online. However, I have got Apache tomcat on my system which runs JSP
files perfectly, including the database interactions. 

I am now trying to run PHP using apache on localhost. Can you please advice:

1) What exactly I need to download for running PHP on Apache.
2) What should be the location of the downloaded PHP folder/file/executable
so that it interacts easily with Apache.
3) Settings if any !

I have an older version of Apache tomcat which is 5.0. I do not use the
Apache Start and Stop options but Start and Stop bat files to run and stop
apache.

Thanks in advance.
-- 
View this message in context: 
http://www.nabble.com/Just-two-PHP-questions-tf2684323.html#a7487358
Sent from the Php - Database mailing list archive at Nabble.com.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Special Character

2006-11-22 Thread David Skyers
Hi Kevin,
 
Thanks for this, it got rid of my special characters. However I now have a 
problem with foreign characters.
 
Example 
 
'De l'Âge du fer au haut Moyen Âge.' 
 
gets inserted into oracle as 
 
De l'Acirc;ge du fer au haut Moyen Acirc;ge.
 
I have an oracle procedure that inserts the data, if I run the oracle procedure 
directly in oracle it inserts the special characters okay. The problem seems to 
be with the way php execute the procedure.
 
Any ideas?
 
David

  _  

From: Kevin Murphy [mailto:[EMAIL PROTECTED] 
Sent: 16 November 2006 16:45
To: David Skyers
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] Special Character


A solution I use is to do apply this function to all POST data collected. The 
key here for your problem is the chr(150) and chr(151) that are replaced with a 
normal hyphen. This also takes care of MS Words Smart Quotes. If there are 
other MS Characters you need to convert, just add them to the pattern field as 
the numeric version, and then add one to the array what the replacement is.  

function sanitize($data)
{
  $pattern = array(chr(145),chr(146),chr(147),chr(148),chr(150),chr(151));
$replacements = array(',','','','-','--');
$data = str_replace($pattern,$replacements,$data);
$data = trim($data);
$data = preg_replace(/ +/,  , $data);
$data = addslashes($data);
return $data;
}




-- 
Kevin Murphy
Webmaster: Information and Marketing Services
Western Nevada Community College
www.wncc.edu
775-445-3326


On Nov 16, 2006, at 7:32 AM, David Skyers wrote:


Thanks,

The problem is, we will have hundreds of users using Microsoft Word and
we cannot switch it off for all of them. Ideally I need some type of
string replace function, so no matter what they enter it gets trapped an
replaced.

It's not the normal hyphens that cause a problem but the long hyphens.

Regards

David

-Original Message-
From: Dan Shirah [mailto:[EMAIL PROTECTED]
Sent: 16 November 2006 15:13
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Special Character

To turn off the auto formatting of hyphens:

In Microsoft Word 2003:

Open a new document.
Go to ToolsAuto Correct Options
Select the Auto Format As You Type tab Deselect the Hyphens (--) with
Dash (-) option.

Even though it says it will replace a double hyphen (--) with a Dash
(This is an em dash) it also does the same thing for a single hyphen
depending on the sentance structure.

Hope this helps!

Dan


On 11/16/06, Niel Archer [EMAIL PROTECTED] wrote:


Hi David

What you describe sounds like Word is auto replacing hyphens 
with
either
en- or em-dashes.  This is a configurable option in Word that 
often
defaults to on.  Try using double quotes, If they get switched 
to 66's
and 99's style quotes, then that is likely the problem.  I no 
longer
use MS Office for these and other reasons, so cannot tell you 
how to
switch off this formatting.  But it can be switched off, 
somewhere

within it.


The only other option I can think of would be to change your Db
character set to one that can accept these extended characters. 
That
might also mean changing some of Window's/Word's behaviour (to 
be
using
UTF-8 for example).

Niel

--
PHP Database Mailing List (http://www.php.net/) To unsubscribe, 
visit:
http://www.php.net/unsub.php








[PHP-DB] My first try with PHP and Oracle ..

2006-11-22 Thread Matthias Bareuther

Hello everybody,

I'd like to connect to OracleDB using AdoDB.

Here's my sourcecode so far :

?php
error_reporting(E_ALL);

include '/srv/www/htdocs/adodb/adodb.inc.php';

$conn = ADONewConnection('oracle');
$conn-debug = true;
$conn-PConnect($host,$user, $pass, $dbase);

?

When I load the site, it alway sais :
'MyServer-IP': Missing extension for native

I asked google about this message, but the links I found didn't really 
help me. :-(


Does anyone know, what's the meaning of this message? And how to solve 
the problem?


Thank you .. in advance .. ,-)

Greetz
Matthias

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Direct Import Excel Data to MySQL (without CSV)

2006-11-22 Thread Adrian Schimpf
Hi together

Is there a way to direct import MySQL data into an Excel Sheet, edit it
and click a button to upload/sync it?
I'm already using an ODBC driver to import the Data but then I'm not
able to write the data back.

Is someone using a reliable solution? 

Regards
Adrian


Introduction:
This is my first post to this list, even though I'm a frequently reader
of the list. Here is a short introduction:
I live and work in Switzerland as a webmaster. Currently doing a lot of
internal (intranet) projects such as an address db, etc.
Mostly using PHP and MySQL (JS/CSS/HTML)

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] search error

2006-11-22 Thread Asif Qureshi
search error and code has been posted
  --
  Got error 28 from table handler
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result 
resource in /home2/wwwabcde/public_html/multipurposechain/searchfuncs.php on 
line 294
Got error 28 from table handlerDisplaying results 1-10 of 4541 matches (12.77 
seconds) 
  Result page: 1 2 3 4 5 6 7 8 9 10 Next
   
  

   
?
/***
  /
  
error_reporting(E_ALL ^ E_NOTICE);
$include_dir = include;
include $include_dir/commonfuncs.php;
  
 function cmp($a, $b) {
  if ($a['weight'] == $b['weight'])
   return 0;
return ($a['weight']  $b['weight']) ? -1 : 1;
 }
   function addmarks($a) {
  $a = eregi_replace([ ]+,  , $a);
  $a = str_replace( +, +, $a);
  $a = str_replace( , +, $a);
  return $a;
 }
   function makeboollist($a) {
  global $entities;
  while ($char = each($entities)) {
   $a = eregi_replace($char[0], $char[1], $a);
  }
  $a = trim($a);
  $a = eregi_replace(quot;, \, $a);
  $returnWords = array();
  //get all phrases
  $regs = Array();
  while (eregi(([-]?)\([^\]+)\, $a, $regs)) {
   if ($regs[1] == '') {
$returnWords['+s'][] = $regs[2];
$returnWords['hilight'][] = $regs[2];
   } else {
$returnWords['-s'][] = $regs[2];
   }
   $a = str_replace($regs[0], , $a);
  }
  $a = strtolower(eregi_replace([ ]+,  , $a));
//  $a = remove_accents($a);
  $a = trim($a);
  $words = explode(' ', $a);
  if ($a==) {
   $limit = 0;
  } else {
  $limit = count($words);
  }
  
  $k = 0;
  //get all words (both include and exlude)
  $includeWords = array();
  while ($k  $limit) {
   if (substr($words[$k], 0, 1) == '+') {
$includeWords[] = substr($words[$k], 1);
   } else if (substr($words[$k], 0, 1) == '-') {
$returnWords['-'][] = substr($words[$k], 1);
   } else {
$includeWords[] = $words[$k];
$returnWords['hilight'][] =  $words[$k];
   }
   $k++;
  }
  //add words from phrases to includes
  if (isset($returnWords['+s'])) {
   foreach ($returnWords['+s'] as $phrase) {
$phrase = strtolower(eregi_replace([ ]+,  , $phrase));
$phrase = trim($phrase);
$temparr = explode(' ', $phrase);
foreach ($temparr as $w)
 $includeWords[] = $w;
   }
  }
foreach ($includeWords as $word) {
   if (!($word =='')) {
if (ignoreWord($word)) {
   $returnWords['ignore'][] = $word;
} else {
 $returnWords['+'][] = $word;
} 
   }
}
return $returnWords;
 }
   function ignoreword($word) {
  global $common;
  global $min_word_length;
  global $index_numbers;
  if ($index_numbers == 1) {
   $pattern = [a-z0-9]+;
  } else {
   $pattern = [a-z]+;
  }
  if (strlen($word)  $min_word_length || (!eregi($pattern, 
remove_accents($word))) || ($common[$word] == 1)) {
   return 1;
  } else {
   return 0;
  }
 }
   function search($searchstr, $category, $start, $per_page, $type) {
  global $length_of_link_desc,$mysql_table_prefix, $show_meta_description;
//find all sites that should not be included in the result
  if (count($searchstr['+']) == 0) {
   return null;
  }
  $wordarray = $searchstr['-'];
  $notlist = array();
  $not_words = 0;
  while ($not_words  count($wordarray)) {
   $searchword = addslashes($wordarray[$not_words]);
 $query1 = SELECT link_id from .$mysql_table_prefix.link_keyword, 
.$mysql_table_prefix.keywords where 
.$mysql_table_prefix.link_keyword.keyword_id= 
.$mysql_table_prefix.keywords.keyword_id and keyword='$searchword';
   echo mysql_error();
   $result = mysql_query($query1);
 while ($row = mysql_fetch_row($result)) { 
$notlist[$not_words]['id'][$row[0]] = 1;
   }
   $not_words++;
  }
  
//find all sites containing the search phrase
  $wordarray = $searchstr['+s'];
  $phrase_words = 0;
  while ($phrase_words  count($wordarray)) {
   $searchword = addslashes($wordarray[$phrase_words]);
   $query1 = SELECT link_id from .$mysql_table_prefix.links where fulltxt 
like '% $searchword%';
   echo mysql_error();
   $result = mysql_query($query1);
   $num_rows = mysql_num_rows($result);
   if ($num_rows == 0) {
return null;
   }
   while ($row = mysql_fetch_row($result)) { 
$phraselist[$phrase_words]['id'][$row[0]] = 1;
   }
   $phrase_words++;
  }
  
if ($category 0) {
   $allcats = get_cats($category);
   $catlist = implode(,, $allcats);
   $query1 = select link_id from .$mysql_table_prefix.links, 
.$mysql_table_prefix.sites, .$mysql_table_prefix.categories, 
.$mysql_table_prefix.site_category where .$mysql_table_prefix.links.site_id 
= .$mysql_table_prefix.sites.site_id and .$mysql_table_prefix.sites.site_id 
= .$mysql_table_prefix.site_category.site_id and 
.$mysql_table_prefix.site_category.category_id in ($catlist);
   $result = mysql_query($query1);
   echo mysql_error();
   $num_rows = mysql_num_rows($result);
   if ($num_rows == 0) {
return null;
   }
   while ($row = 

RE: [PHP-DB] Just two PHP questions

2006-11-22 Thread Miguel Guirao


1) What exactly I need to download for running PHP on Apache.
PHP the latest version

2) What should be the location of the downloaded PHP folder/file/executable
so that it interacts easily with Apache.
Any, but if you prefer tu indicate an installation directory you may do that
by specifing it during configuration: configure -options_here

3) Settings if any !
Read the manual, there are many settings you can set, but basically almost
all of them depend upon your production or testing environment

Regards,
Guirao



Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta 
dirigido; contiene informacion estrictamente confidencial y legalmente 
protegida, cuya divulgacion es sancionada por la ley. Si el lector de este 
mensaje no es a quien esta dirigido, ni se trata del empleado o agente 
responsable de esta informacion, se le notifica por medio del presente, que su 
reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio 
este comunicado por error, favor de notificarlo inmediatamente al remitente y 
destruir el mensaje. Todas las opiniones contenidas en este mail son propias 
del autor del mensaje y no necesariamente coinciden con las de Radiomovil 
Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, 
afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos.

This message is for the sole use of the person or entity to whom it is being 
sent.  Therefore, it contains strictly confidential and legally protected 
material whose disclosure is subject to penalty by law.  If the person reading 
this message is not the one to whom it is being sent and/or is not an employee 
or the responsible agent for this information, this person is herein notified 
that any unauthorized dissemination, distribution or copying of the materials 
included in this facsimile is strictly prohibited.  If you received this 
document by mistake please notify  immediately to the subscriber and destroy 
the message. Any opinions contained in this e-mail are those of the author of 
the message and do not necessarily coincide with those of Radiomovil Dipsa, 
S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries 
companies. No part of this message or attachments may be used or reproduced in 
any manner whatsoever.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] search error

2006-11-22 Thread Asif Qureshi
Got error 28 from table handler
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result 
resource in /home2/wwwabcde/public_html/multipurposechain/searchfuncs.php on 
line 294
Got error 28 from table handlerDisplaying results 1-10 of 4541 matches (12.77 
seconds) 
  Result page: 1 2 3 4 5 6 7 8 9 10 Next
   
  

   
?
/***
  /
  
error_reporting(E_ALL ^ E_NOTICE);
$include_dir = include;
include $include_dir/commonfuncs.php;
  
 function cmp($a, $b) {
  if ($a['weight'] == $b['weight'])
   return 0;
return ($a['weight']  $b['weight']) ? -1 : 1;
 }
   function addmarks($a) {
  $a = eregi_replace([ ]+,  , $a);
  $a = str_replace( +, +, $a);
  $a = str_replace( , +, $a);
  return $a;
 }
   function makeboollist($a) {
  global $entities;
  while ($char = each($entities)) {
   $a = eregi_replace($char[0], $char[1], $a);
  }
  $a = trim($a);
  $a = eregi_replace(quot;, \, $a);
  $returnWords = array();
  //get all phrases
  $regs = Array();
  while (eregi(([-]?)\([^\]+)\, $a, $regs)) {
   if ($regs[1] == '') {
$returnWords['+s'][] = $regs[2];
$returnWords['hilight'][] = $regs[2];
   } else {
$returnWords['-s'][] = $regs[2];
   }
   $a = str_replace($regs[0], , $a);
  }
  $a = strtolower(eregi_replace([ ]+,  , $a));
//  $a = remove_accents($a);
  $a = trim($a);
  $words = explode(' ', $a);
  if ($a==) {
   $limit = 0;
  } else {
  $limit = count($words);
  }
  
  $k = 0;
  //get all words (both include and exlude)
  $includeWords = array();
  while ($k  $limit) {
   if (substr($words[$k], 0, 1) == '+') {
$includeWords[] = substr($words[$k], 1);
   } else if (substr($words[$k], 0, 1) == '-') {
$returnWords['-'][] = substr($words[$k], 1);
   } else {
$includeWords[] = $words[$k];
$returnWords['hilight'][] =  $words[$k];
   }
   $k++;
  }
  //add words from phrases to includes
  if (isset($returnWords['+s'])) {
   foreach ($returnWords['+s'] as $phrase) {
$phrase = strtolower(eregi_replace([ ]+,  , $phrase));
$phrase = trim($phrase);
$temparr = explode(' ', $phrase);
foreach ($temparr as $w)
 $includeWords[] = $w;
   }
  }
foreach ($includeWords as $word) {
   if (!($word =='')) {
if (ignoreWord($word)) {
   $returnWords['ignore'][] = $word;
} else {
 $returnWords['+'][] = $word;
} 
   }
}
return $returnWords;
 }
   function ignoreword($word) {
  global $common;
  global $min_word_length;
  global $index_numbers;
  if ($index_numbers == 1) {
   $pattern = [a-z0-9]+;
  } else {
   $pattern = [a-z]+;
  }
  if (strlen($word)  $min_word_length || (!eregi($pattern, 
remove_accents($word))) || ($common[$word] == 1)) {
   return 1;
  } else {
   return 0;
  }
 }
   function search($searchstr, $category, $start, $per_page, $type) {
  global $length_of_link_desc,$mysql_table_prefix, $show_meta_description;
//find all sites that should not be included in the result
  if (count($searchstr['+']) == 0) {
   return null;
  }
  $wordarray = $searchstr['-'];
  $notlist = array();
  $not_words = 0;
  while ($not_words  count($wordarray)) {
   $searchword = addslashes($wordarray[$not_words]);
 $query1 = SELECT link_id from .$mysql_table_prefix.link_keyword, 
.$mysql_table_prefix.keywords where 
.$mysql_table_prefix.link_keyword.keyword_id= 
.$mysql_table_prefix.keywords.keyword_id and keyword='$searchword';
   echo mysql_error();
   $result = mysql_query($query1);
 while ($row = mysql_fetch_row($result)) { 
$notlist[$not_words]['id'][$row[0]] = 1;
   }
   $not_words++;
  }
  
//find all sites containing the search phrase
  $wordarray = $searchstr['+s'];
  $phrase_words = 0;
  while ($phrase_words  count($wordarray)) {
   $searchword = addslashes($wordarray[$phrase_words]);
   $query1 = SELECT link_id from .$mysql_table_prefix.links where fulltxt 
like '% $searchword%';
   echo mysql_error();
   $result = mysql_query($query1);
   $num_rows = mysql_num_rows($result);
   if ($num_rows == 0) {
return null;
   }
   while ($row = mysql_fetch_row($result)) { 
$phraselist[$phrase_words]['id'][$row[0]] = 1;
   }
   $phrase_words++;
  }
  
if ($category 0) {
   $allcats = get_cats($category);
   $catlist = implode(,, $allcats);
   $query1 = select link_id from .$mysql_table_prefix.links, 
.$mysql_table_prefix.sites, .$mysql_table_prefix.categories, 
.$mysql_table_prefix.site_category where .$mysql_table_prefix.links.site_id 
= .$mysql_table_prefix.sites.site_id and .$mysql_table_prefix.sites.site_id 
= .$mysql_table_prefix.site_category.site_id and 
.$mysql_table_prefix.site_category.category_id in ($catlist);
   $result = mysql_query($query1);
   echo mysql_error();
   $num_rows = mysql_num_rows($result);
   if ($num_rows == 0) {
return null;
   }
   while ($row = mysql_fetch_row($result)) { 
$category_list[$row[0]] = 1;
   }
  }
//find 

Re: [PHP-DB] My first try with PHP and Oracle ..

2006-11-22 Thread Chris

Matthias Bareuther wrote:

Hello everybody,

I'd like to connect to OracleDB using AdoDB.

Here's my sourcecode so far :

?php
error_reporting(E_ALL);

include '/srv/www/htdocs/adodb/adodb.inc.php';

$conn = ADONewConnection('oracle');
$conn-debug = true;
$conn-PConnect($host,$user, $pass, $dbase);

?

When I load the site, it alway sais :
'MyServer-IP': Missing extension for native


The adodb list would be the best place to ask:

http://adodb.sourceforge.net/#mail

--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Direct Import Excel Data to MySQL (without CSV)

2006-11-22 Thread Chris

Adrian Schimpf wrote:

Hi together

Is there a way to direct import MySQL data into an Excel Sheet, edit it
and click a button to upload/sync it?
I'm already using an ODBC driver to import the Data but then I'm not
able to write the data back.


That's probably the only way to do it.

What do you mean you can't write the data back - do you get an error?

--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] search error

2006-11-22 Thread Chris

Asif Qureshi wrote:

Got error 28 from table handler
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result 
resource in /home2/wwwabcde/public_html/multipurposechain/searchfuncs.php on 
line 294
Got error 28 from table handlerDisplaying results 1-10 of 4541 matches (12.77 seconds) 


We're not going to go through all of your code. Narrow down the problem 
and we'll be able to help.


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Special Character

2006-11-22 Thread Chris

David Skyers wrote:

Hi Kevin,
 
Thanks for this, it got rid of my special characters. However I now have a problem with foreign characters.
 
Example 
 
'De l'Âge du fer au haut Moyen Âge.' 
 
gets inserted into oracle as 
 
De l'Acirc;ge du fer au haut Moyen Acirc;ge.
 
I have an oracle procedure that inserts the data, if I run the oracle procedure directly in oracle it inserts the special characters okay. The problem seems to be with the way php execute the procedure.


Are you calling htmlentities or htmlspecialchars before calling the 
procedure? That looks like what's happening.


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] My first try with PHP and Oracle ..

2006-11-22 Thread Christopher Jones

Matthias Bareuther wrote:

Hello everybody,

I'd like to connect to OracleDB using AdoDB.

Here's my sourcecode so far :

?php
error_reporting(E_ALL);

include '/srv/www/htdocs/adodb/adodb.inc.php';

$conn = ADONewConnection('oracle');
$conn-debug = true;
$conn-PConnect($host,$user, $pass, $dbase);

?

When I load the site, it alway sais :
'MyServer-IP': Missing extension for native


The AdoDB software is written in PHP and connects to your Oracle
database using PHP's oci8 library calls.

You can get AdoDB's Missing extension error when oci8 is not
enabled in PHP.

There are lots of installation documents that show how to configure
PHP with oci8 enabled.  One is at:

  
http://www.oracle.com/technology/tech/php/pdf/underground-php-oracle-manual.pdf

Chris

--
Christopher Jones, Oracle
Email: [EMAIL PROTECTED]Tel: +1 650 506 8630
Blog:  http://blogs.oracle.com/opal/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



AW: [PHP-DB] Direct Import Excel Data to MySQL (without CSV)

2006-11-22 Thread Adrian Schimpf
What do you mean you can't write the data back - do you get an error?

I try to edit the data on the Excel surface and then when I made some
changes I would like to safe them back in the MySQL Database.

Is it possible to write the data back with the common Excel
functionality (including ODBC)

Regards, Adrian

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Fwd: Re: [PHP-DB] search error

2006-11-22 Thread Asif Qureshi
Here I narrow down the problem.
  www.multipurposechain.com
   
  I enter for example search word,
  world, Its giving error.
   
  However previously, was giving proper output and search results from tables 
in database. 

 __
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com ---BeginMessage---

Asif Qureshi wrote:

Got error 28 from table handler
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result 
resource in /home2/wwwabcde/public_html/multipurposechain/searchfuncs.php on 
line 294
Got error 28 from table handlerDisplaying results 1-10 of 4541 matches (12.77 seconds) 


We're not going to go through all of your code. Narrow down the problem 
and we'll be able to help.


--
Postgresql  php tutorials
http://www.designmagick.com/

---End Message---
-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Fwd: Re: [PHP-DB] search error

2006-11-22 Thread Chris

Asif Qureshi wrote:

Here I narrow down the problem.


I meant narrow down the problem in your code.

Add

echo mysql error?  . mysql_error() . br/;

after your mysql_query calls for example.

--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Special Character

2006-11-22 Thread Vincent DUPONT

I you use a SQL adapter, like ADO, it could do the htmlentities it self...

However, if you would like to change this, note that oracle will consider some 
chars as 'special chars', like (if I remember well) the .
To be able to insert a string with these chars, you need to search/replace them 
by their ascii value (use the Oracle function chr()
This is specially true when inserting urls.

vincent


-Original Message-
From: Chris [mailto:[EMAIL PROTECTED]
Sent: Wed 22/11/2006 22:17
To: David Skyers
Cc: php-db@lists.php.net
Subject: Re: [PHP-DB] Special Character
 
David Skyers wrote:
 Hi Kevin,
  
 Thanks for this, it got rid of my special characters. However I now have a 
 problem with foreign characters.
  
 Example 
  
 'De l'Âge du fer au haut Moyen Âge.' 
  
 gets inserted into oracle as 
  
 De l'Acirc;ge du fer au haut Moyen Acirc;ge.
  
 I have an oracle procedure that inserts the data, if I run the oracle 
 procedure directly in oracle it inserts the special characters okay. The 
 problem seems to be with the way php execute the procedure.

Are you calling htmlentities or htmlspecialchars before calling the 
procedure? That looks like what's happening.

-- 
Postgresql  php tutorials
http://www.designmagick.com/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Moving phpNuke to phpBB

2006-11-22 Thread Niel Archer
Hi

  I'm helping out someone move from PHPNuke to phpBB.  Only the forums
and users need to be moved.

  Nuke's Db structure for the forums seems to mimic phpBB's closely,
which is no great surprise.
  Any advice or information would be greatly appreciated.  For example,
anyone know a way to convert the stored passwords?  Nuke uses a 40 char
hash, while phpBB only 32.

Niel

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Fwd: Re: Fwd: Re: [PHP-DB] search error

2006-11-22 Thread Asif Qureshi


Note: forwarded message attached.
 
-
Sponsored Link

Mortgage rates near 39yr lows. $420,000 Mortgage for $1,399/mo - Calculate new 
house payment---BeginMessage---
I have this code already, have a look at this few lines of code, which is 
already existing.
  --  
  $query1 = SELECT distinct link_id, url, title, description,  $fulltxt, size 
FROM .$mysql_table_prefix.links WHERE link_id in ($inlist);
  $result = mysql_query($query1);
  echo mysql_error();
  -
  I have experience of past I would get number of responses, and php database 
mailing list had many members world wide, only single response, why?
  --
  In previous code, posted, can you have a look in case tables have been joined 
properly to respond to query and give proper search results.
  

Chris [EMAIL PROTECTED] wrote:
  Asif Qureshi wrote:
 Here I narrow down the problem.

I meant narrow down the problem in your code.

Add

echo mysql error?  . mysql_error() . 
;

after your mysql_query calls for example.

-- 
Postgresql  php tutorials
http://www.designmagick.com/


 
-
Everyone is raving about the all-new Yahoo! Mail beta.---End Message---
-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php