Re: [PHP-DB] XML

2002-06-27 Thread B i g D o g

MySQL has xml support...have you looked at the docs at mysql.com for
anything that might help you input the data directly...


B i g D o g


- Original Message -
From: Peter Lovatt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, June 27, 2002 3:03 PM
Subject: [PHP-DB] XML


 Hi

 I am looking at a project using XML to import and export data into MySql
 directly or using php. The datasets are quite large (40-50 million
records)

 I haven't used XML before.

 Does it take long to work out how to use php/XML? Are there any problems
 working with large datasets?

 Thanks

 Peter



 ---
 Excellence in internet and open source software
 ---
 Sunmaia
 www.sunmaia.net
 [EMAIL PROTECTED]
 tel. 0121-242-1473
 ---

  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: 27 June 2002 17:43
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Subject: [PHP-DB] Re: PHP and msql Error
 
 
  The error is in your MySql statement.  Sounds like you are calling the
  wrong data field / column.  Check you spelling and syntax to make sure
  all of that is in order.  If you can't find it, copy it and post it.
  We'll help you out
 
  gl -- Seth
 
  Comp Boy wrote:
 
I am getting the following error:
  
Warning: Supplied argument is not a valid mSQL result resource in
/usr/local/apache/htdocs/inc/listings.inc on line 24
  
listings.inc: 24
$numRows = msql_numrows( $result );
  
The manual on php.net says that it takes no variables
  msql_numrows(void)
however it says it is another version of msql_num_rows(int msql);
  
The code I am trying to run, runs perfectly fine on another one of
our
   systems.  I was just setting up a development server and now I
  am getting
   this problem.  The specs are the same except for the version of Apache
   production is 1.3.9 and development is 1.3.26
  
PHP vesrion 4.1.2
  
./msqladmin version
Version Details :-
msqladmin version   2.0.11
mSQL server version 2.0.11
mSQL protocol version   23
mSQL connection Localhost via UNIX socket
Target platform Linux-2.2.14-5.0-i686
  
   PHP was configured:
   ./configure --with-apxs=/usr/local/apache/bin/apxs --with-msql
  
   msql was a default install.
  
   Does anyone know what I did wrong?  Do I need to recompile with some
   different options?
  
   TIA
   Jason
  
  
 
 
  --
  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 Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] xml doc validation .... details ...... ! ! ! !

2002-05-20 Thread szii

Your questions are far too vague and XML/XML:Schema/XSLT etc
are far too complicated to explain without definitive focus'd questions.

XML allows you to do whatever YOU want in whatever format
YOU want. 

Best help I can give is this...

http://www.w3.org/

'Luck

-Szii

- Original Message - 
From: toby z [EMAIL PROTECTED]
To: php db [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 6:52 PM
Subject: [PHP-DB] xml doc validation  details .. ! ! ! ! 


 well  its something like 
 
 i need to take user input and store it somewhere 
 and then retrieve it back thru DOM 
 
 and i guess i need to store that input in an xml
 doccument like the one i sent earlier 
 or do i 
 
 now the thing that im most concerned bout is .
 this doccument or anyother that i try tomake using the
 scheema doesent get validated 
 i keep getting an error fo one of the fields for each
 .
 
 i've tried changing the field types  but ...
 even that doesnt change anything ..
 
 
 secondly  i made a single scheema . and i
 included all the elements in it .
 user-info, content-info, categry,..
 with all their subelements .
 i think im right  or am i 
 
 third .i have a few elements in the scheema that
 are repeated .
 
 do u think that cud be the problem  ?
 
 so thats it ...
 if u want me to tell u more  plz do let me know
 
 
 thnx a million 
 
 toby 
 
 
 
 
 __
 Do You Yahoo!?
 LAUNCH - Your Yahoo! Music Experience
 http://launch.yahoo.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




Re: [PHP-DB] XML coming out from MySQL

2001-11-10 Thread Tomas Garcia Ferrari

 I've never parsed XML with PHP, but it might help if you can show the
 document that's breaking the parser, and also let us know if other
 documents are working fine...
 
 -Lorenzo

Hi,

The document is like this:

?xml version=1.0 encoding=iso-8859-1?
articulo
volantaSome text/volanta
tituloSome text/titulo
bajadaSome text/bajada
parrafoSome text/parrafo
urlhttp://whatever.com//url
copyWhomever 2001/copy
/articulo

Up to now, I solve the problem modifying the lines saying
 while ($data = $file) {
 if (!xml_parse($xml_parser, $data, 0)) {
 die(sprintf(XML error: %s at line %d,
 xml_error_string(xml_get_error_code($xml_parser)),
 xml_get_current_line_number($xml_parser)));
 }
 }

into
 xml_parse($xml_parser, $data, 0);

I'd noticed that I don't need to read the document line by line.

Regards and thanks,
Tomás


+-- --+
   Tomás García Ferrari
   Bigital
   http://bigital.com/
+-- --+



--
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] XML coming out from MySQL

2001-11-09 Thread Gonzalez, Lorenzo

I've never parsed XML with PHP, but it might help if you can show the
document that's breaking the parser, and also let us know if other
documents are working fine...
 
-Lorenzo

-Original Message- 
From: Tomas Garcia Ferrari 
Sent: Fri 11/9/2001 5:14 PM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: [PHP-DB] XML coming out from MySQL



Hello,

I'm trying to parse an XML file stored on MySQL. I'm using this
code:

 ?php
 global $CFG, $ME;

 $qid = db_query(
 SELECT texto
 FROM articulos
 WHERE id = $id
 );

 $r = db_fetch_object($qid);
 $file = $r-texto;


 $map_array = array(
 ARTICULO = ,
 VOLANTA = h2,
 TITULO = h1,
 SUBTITULO = h3,
 BAJADA  = h2,
 PARRAFO  = p,
 AUTOR  = h3,
 URL  = h3,
 COPY  = h3
 );

 function startElement($parser, $name, $attrs) {
 global $map_array;
 if ($htmltag = $map_array[$name]) {
 print $htmltag;
 }
 }

 function endElement($parser, $name) {
 global $map_array;
 if ($htmltag = $map_array[$name]) {
 print /$htmltag;
 }
 }

 function characterData($parser, $data) {
 print $data;
 }

 $xml_parser = xml_parser_create();
 // use case-folding so we are sure to find the tag in
$map_array
 xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING,
true);
 xml_set_element_handler($xml_parser, startElement,
endElement);
 xml_set_character_data_handler($xml_parser, characterData);

 while ($data = $file) {
 if (!xml_parse($xml_parser, $data, 0)) {
 die(sprintf(XML error: %s at line %d,
 xml_error_string(xml_get_error_code($xml_parser)),
 xml_get_current_line_number($xml_parser)));
 }
 }
 xml_parser_free($xml_parser);
 ?

and having this at the end of the outuput:

 XML error: junk after document element at line 25

What does it mean? How can I solve it / trace it?

Regards,
Tomás

+-- --+
   Tomás García Ferrari
   Bigital
   http://bigital.com/
+-- --+



--
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]