[PHP-DB]
Title: Glacier Is there a way to transfer mysql data to xml files? I have to use database contents from a static contition, lets say, presentating a site from cd-rom If is an other way I'll like to deal with Thanx Qbit - Gatsis NikosWeb developertel.: 2108256721 - 2108256722fax: 2108256712email: [EMAIL PROTECTED]http://www.qbit.gr
ODP: [PHP-DB]
There is some tool from Hit Software http://www.hitsw.com http://www.hitsw.com Allora Good luck. Mariusz Mariusz Brzezinski IT Specialist Business Development Department e-mail [EMAIL PROTECTED] tel. +48 61 856 53 57 -Oryginalna wiadomosc- Od: nikos [mailto:[EMAIL PROTECTED] Wyslano: 2 kwietnia 2003 12:44 Do: PHP-mailist Temat: [PHP-DB] Is there a way to transfer mysql data to xml files? I have to use database contents from a static contition, lets say, presentating a site from cd-rom If is an other way I'll like to deal with Thanx _ Qbit - Gatsis Nikos Web developer tel.: 2108256721 - 2108256722 fax: 2108256712 email: [EMAIL PROTECTED] http://www.qbit.gr -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Re: Database Design Help
Thanks for your reply but the data fields to be captured have to be the same for each project, ie when an administrator sets up project A, he might want to capture fields X, Y, Z for each booking taken for that project... Gustavo Del Castillo Meza [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] The easiest way to deal with this is to add a TEXT field to the end of the Booking table and have the user put in there all the extra data they need. If this doesnt resolve your problem you could add an etra table called extraData or something like that it may look like this: extraData: PK extraData_ID FK Booking_ID Description Here you describe the data to be captured Ej. Location Data-And here the actual data Ej. Quebec This way you can capture N records of extra data for the booking Shaun [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] the data colleccted at each booking will be the fields set by an administrator that he/she feels are appropriate to collect for that project. Gustavo Del Castillo Meza [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] What kind of data do you need to collect at each booking? Shaun [EMAIL PROTECTED] escribió en el mensaje news:[EMAIL PROTECTED] Hi, I am creating a database for a web application. The idea for the application is for a company administrator to be able to log into the site and allocate staff to a project. Staff will be able to log in and update the status of the project they are working on and clients will be able to log in and book a member of staff to their own projects. Administrators will be able to add / edit / delete - staff / clients / projects. Here is my database diagram: http://www.mania.plus.com My problem is each different project will need to have different data collected for it at each booking. How could I handle this in the database model? The administrator would like to be able to edit the data collected for each project via the site... Any other comments on my database model would be appreciated as this is my weakest area of web development by far! -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] sending a form feed to a printer
Hello, I am having problems getting the \f (form feed) expression to work. After a certain amount of lines print I want to start printing the next line on a new sheet of paper. Any ideas of what I could be doing wrong. Below is a sample piece of my code. The bold code is where I am trying to issue the form feed. while($row = mysql_fetch_array($dbResult)) { print(TR\n); print(TD class=\tdborder\A HREF=\show_single_server.php?server_name=$row[0]\ TARGET=\text_float\ . $row[0] . /TD\n); print(TD class=\tdborder\. $row[1] . /TD\n); print(TD class=\tdborder\. $row[2] . /TD\n); print(TD class=\tdborder\A HREF=\$PHP_SELF?mid_tier=$row[3]db_rel=0\ TARGET=\text_float\. $row[3] . /TD\n); print(TD class=\tdborder\A HREF=\$PHP_SELF?db_rel=$row[4]mid_tier=0\ TARGET=\text_float\. $row[4] . /TD\n); $rowdata = $row[5]; if($rowdata == ) { print(TD class=\tdborder\nbsp;/TD\n); } else { print(TD class=\tdborder\. $row[5] . /TD\n); } print(TD class=\tdborder\. $row[6] . /TD\n); //print(/TR\n); if($counter == 20) { $counter = 0; print(/TR\f); continue; } else { $counter ++; print(/TR); continue; } }
[PHP-DB] Re: sending a form feed to a printer
form feeds don't work in html. It is interpreted as a space. Arthur Chevalier wrote: Hello, I am having problems getting the \f (form feed) expression to work. After a certain amount of lines print I want to start printing the next line on a new sheet of paper. Any ideas of what I could be doing wrong. Below is a sample piece of my code. The bold code is where I am trying to issue the form feed. while($row = mysql_fetch_array($dbResult)) { print(TR\n); print(TD class=\tdborder\A HREF=\show_single_server.php?server_name=$row[0]\ TARGET=\text_float\ . $row[0] . /TD\n); print(TD class=\tdborder\. $row[1] . /TD\n); print(TD class=\tdborder\. $row[2] . /TD\n); print(TD class=\tdborder\A HREF=\$PHP_SELF?mid_tier=$row[3]db_rel=0\ TARGET=\text_float\. $row[3] . /TD\n); print(TD class=\tdborder\A HREF=\$PHP_SELF?db_rel=$row[4]mid_tier=0\ TARGET=\text_float\. $row[4] . /TD\n); $rowdata = $row[5]; if($rowdata == ) { print(TD class=\tdborder\nbsp;/TD\n); } else { print(TD class=\tdborder\. $row[5] . /TD\n); } print(TD class=\tdborder\. $row[6] . /TD\n); //print(/TR\n); if($counter == 20) { $counter = 0; print(/TR\f); continue; } else { $counter ++; print(/TR); continue; } } -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Re: sending a form feed to a printer
I got this code from something I found on a google search, but I've used it on other clients' projects successfully: This will work in IE4 and higher: HTML BODY page one text P style=page-break-before: always nbsp; page two text P style=page-break-before: always nbsp; page 3 text /body /html You also have the option of using page-break-after in the same manner. Three things: 1) Not sure what the equivalent would be in NN or any other browser. 2) You'd probably want to work this into a CSS style. 3) As always, this is a rather dumb feature in that it does not recognize page height or anything. It pretty much requires that you put the page breaks in manually where you think they should fall. In a large document/report, sometimes that can get a little hairy. Here's what the W3C has to say: http://www.w3.org/TR/REC-CSS2/page.html Here's what M$ has to say: http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/ref erence/properties/pagebreakbefore.asp Hope this helps. Rich -Original Message- From: Jason S Motes [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 11:16 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: sending a form feed to a printer form feeds don't work in html. It is interpreted as a space. Arthur Chevalier wrote: Hello, I am having problems getting the \f (form feed) expression to work. After a certain amount of lines print I want to start printing the next line on a new sheet of paper. Any ideas of what I could be doing wrong. Below is a sample piece of my code. The bold code is where I am trying to issue the form feed. while($row = mysql_fetch_array($dbResult)) { print(TR\n); print(TD class=\tdborder\A HREF=\show_single_server.php?server_name=$row[0]\ TARGET=\text_float\ . $row[0] . /TD\n); print(TD class=\tdborder\. $row[1] . /TD\n); print(TD class=\tdborder\. $row[2] . /TD\n); print(TD class=\tdborder\A HREF=\$PHP_SELF?mid_tier=$row[3]db_rel=0\ TARGET=\text_float\. $row[3] . /TD\n); print(TD class=\tdborder\A HREF=\$PHP_SELF?db_rel=$row[4]mid_tier=0\ TARGET=\text_float\. $row[4] . /TD\n); $rowdata = $row[5]; if($rowdata == ) { print(TD class=\tdborder\nbsp;/TD\n); } else { print(TD class=\tdborder\. $row[5] . /TD\n); } print(TD class=\tdborder\. $row[6] . /TD\n); //print(/TR\n); if($counter == 20) { $counter = 0; print(/TR\f); continue; } else { $counter ++; print(/TR); continue; } } -- 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] Re: sending a form feed to a printer
What you are proposing is possible to do in html, if you add some Cascading Style Sheets to the mix. You will need to use the page-break-after attribute: http://www.w3.org/TR/CSS2/page.html#propdef-page-break-after It would look something like this (in plain html): table style=page-break-after: always tr tdrow1col1/td tdrow1col2/td /tr tr tdrow2col1/td tdrow2col2/td /tr ... tr !--'N' represents the number of rows you wish to print before a form-feed -- tdrowNcol1/td tdrowNcol2/td /tr /table !--A printed page break would occur here-- table style=page-break-after: always !--Wash, rinse, repeat-- AFAIK, you'll have to close the table each time you want to print a line feed, although if you want to keep your table together, you might try putting the 'style=page-break-after: always' attribute inside the appropriate tr tag. No guarantees, tho, as I haven't tried it this way, and it seems to go against the way CSS should work. Also, not every browser supports these CSS attributes. You should be fine on Netscape 6.0/Mozilla and IE 5 or better (not sure about IE, tho). Nathaniel Price http://www.thornvalley.com Who is General Failure and why is he reading my hard drive? - Original Message - From: Jason S Motes [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 8:15 AM Subject: [PHP-DB] Re: sending a form feed to a printer form feeds don't work in html. It is interpreted as a space. Arthur Chevalier wrote: Hello, I am having problems getting the \f (form feed) expression to work. After a certain amount of lines print I want to start printing the next line on a new sheet of paper. Any ideas of what I could be doing wrong. Below is a sample piece of my code. The bold code is where I am trying to issue the form feed. while($row = mysql_fetch_array($dbResult)) { print(TR\n); print(TD class=\tdborder\A HREF=\show_single_server.php?server_name=$row[0]\ TARGET=\text_float\ . $row[0] . /TD\n); print(TD class=\tdborder\. $row[1] . /TD\n); print(TD class=\tdborder\. $row[2] . /TD\n); print(TD class=\tdborder\A HREF=\$PHP_SELF?mid_tier=$row[3]db_rel=0\ TARGET=\text_float\. $row[3] . /TD\n); print(TD class=\tdborder\A HREF=\$PHP_SELF?db_rel=$row[4]mid_tier=0\ TARGET=\text_float\. $row[4] . /TD\n); $rowdata = $row[5]; if($rowdata == ) { print(TD class=\tdborder\nbsp;/TD\n); } else { print(TD class=\tdborder\. $row[5] . /TD\n); } print(TD class=\tdborder\. $row[6] . /TD\n); //print(/TR\n); if($counter == 20) { $counter = 0; print(/TR\f); continue; } else { $counter ++; print(/TR); continue; } } -- 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] Re: sending a form feed to a printer
Try this: html head/head body table border=1 width=100% height=100% trtdhello/td/tr /table table border=1 width=100% height=100% trtdhello/td/tr /table Nato -Original Message- From: Nathaniel Price [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 11:44 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Re: sending a form feed to a printer What you are proposing is possible to do in html, if you add some Cascading Style Sheets to the mix. You will need to use the page-break-after attribute: http://www.w3.org/TR/CSS2/page.html#propdef-page-break-after It would look something like this (in plain html): table style=page-break-after: always tr tdrow1col1/td tdrow1col2/td /tr tr tdrow2col1/td tdrow2col2/td /tr ... tr !--'N' represents the number of rows you wish to print before a form-feed -- tdrowNcol1/td tdrowNcol2/td /tr /table !--A printed page break would occur here-- table style=page-break-after: always !--Wash, rinse, repeat-- AFAIK, you'll have to close the table each time you want to print a line feed, although if you want to keep your table together, you might try putting the 'style=page-break-after: always' attribute inside the appropriate tr tag. No guarantees, tho, as I haven't tried it this way, and it seems to go against the way CSS should work. Also, not every browser supports these CSS attributes. You should be fine on Netscape 6.0/Mozilla and IE 5 or better (not sure about IE, tho). Nathaniel Price http://www.thornvalley.com Who is General Failure and why is he reading my hard drive? - Original Message - From: Jason S Motes [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 8:15 AM Subject: [PHP-DB] Re: sending a form feed to a printer form feeds don't work in html. It is interpreted as a space. Arthur Chevalier wrote: Hello, I am having problems getting the \f (form feed) expression to work. After a certain amount of lines print I want to start printing the next line on a new sheet of paper. Any ideas of what I could be doing wrong. Below is a sample piece of my code. The bold code is where I am trying to issue the form feed. while($row = mysql_fetch_array($dbResult)) { print(TR\n); print(TD class=\tdborder\A HREF=\show_single_server.php?server_name=$row[0]\ TARGET=\text_float\ . $row[0] . /TD\n); print(TD class=\tdborder\. $row[1] . /TD\n); print(TD class=\tdborder\. $row[2] . /TD\n); print(TD class=\tdborder\A HREF=\$PHP_SELF?mid_tier=$row[3]db_rel=0\ TARGET=\text_float\. $row[3] . /TD\n); print(TD class=\tdborder\A HREF=\$PHP_SELF?db_rel=$row[4]mid_tier=0\ TARGET=\text_float\. $row[4] . /TD\n); $rowdata = $row[5]; if($rowdata == ) { print(TD class=\tdborder\nbsp;/TD\n); } else { print(TD class=\tdborder\. $row[5] . /TD\n); } print(TD class=\tdborder\. $row[6] . /TD\n); //print(/TR\n); if($counter == 20) { $counter = 0; print(/TR\f); continue; } else { $counter ++; print(/TR); continue; } } -- 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
[PHP-DB] Award winning peace of mind gjg
Php-db Norton SystemWorks 2003 Software Suite Professional Edition 90% Off $300 Combined Retail Value! Five Feature-Packed Utilities, One Great Price. Only 39.99$! Your computer needs Systemworks Don't wait until it is too late! Includes 5 Powerful Programs *Norton AntiVirus 2003 *Norton Ghost 2003 *GoBack 3 Personal Edition *Norton Utilities 2003 *Norton CleanSweep 2003 - Your Price for this entire package: $39.99 ! For more information about this limited-time amazing package or to place your order http://dealshowroom.com/nsw15.htm Opt-Out Instructions: We are strongly against sending unsolicited emails to those who do not wish to receive our special mailings. If you wish to opt out: http://dealshowroom.com/goodbye.html milyr ejjxz ieczf b fp w viru p amiob falytcn lj v majk bolb y k srrubk
[PHP-DB] Creating a directory listing
I'm trying to do this for a web site. I need to list the contents of each directory on a site to perhaps 4 levels deep (only html files). I've almost got a function going where it starts at the top level and checks each file to see if IT is a directory and if so chdir() to that and list the contents of it until it comes across a directory at that level then chdir() again and so on and when done it will have gone through all files in the 4 levels. I also have to consider searching the files in each directory for a search term (I've got the searching part OK). What is the most efficient way to go through a hierarchy of directories to list or check each file and subdirectory? Right now, this is what I have and I think it works, but not sure if it's most efficient way: if ($handle1 = @opendir($basedir)) { $dir0 = getcwd(); while (false !== ($file1 = readdir($handle1))) { //ignore files that start with periods (hidden files and parent directories) if (substr($file1,0,1) != . substr($file1,0,2) != ..) { if (is_dir($file1)) { chdir($file1); $dir1 = getcwd(); if ($handle2 = @opendir($dir1)) { while (false !== ($file2 = readdir($handle2))) { if (substr($file2,0,1) != . substr($file2,0,2) != ..) { if (is_dir($file2)) { chdir($file2); $dir2 = getcwd(); // and so on as many levels as needed } elseif (ereg(\.htm,$file2)) { echo $file2br; } } } //end while closedir($handle2); chdir($dir0); } //end opendir } elseif (ereg(\.htm,$file1)) { echo $file1br; } } } closedir($handle1); // output the results } Thanks for any assistance. Dave -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] [PHP] OCINewcollection fails after being used more then once
I am trying to use the ocicollection functions. Initially everything works fine, but after reloading the page for the second time I get the following error: OCITypeByName: OCI-22303: type SISTRUT.MENSERRO not found When I try half a minute later, I do manage reload the page without any error. I'm using php-4.2.2 on solaris 2.6 as a module of apache_1.3.26. The php-code I used for this test follows: ? $conn = OCILogon(scott,tiger,db); $sql = BEGIN :SAIDA := SISTRUT.PK_UF.SEL(:CURSOR,:COD_UF); END;; $stmt = OCIParse($conn, $sql); OCIBindByName($stmt,':COD_UF',$cod_uf,32); $saidacoll = OCINewCollection($conn,MENSERRO,SISTRUT); OCIBindByName($stmt,':SAIDA',$saidacoll,-1,OCI_B_SQLT_NTY); $curs = OCINewCursor($conn); OCIBindByName($stmt,:CURSOR,$curs,-1,OCI_B_CURSOR); OCIExecute($stmt); $nmenserro = ocicollsize($saidacoll); for ($i = 0; $i $nmenserro; $i++) $saida[]= $ocicollgetelem($saidacoll,$i); ocifreecollection($saidacol); if ( !$nmenserro ) { OCIExecute($curs); while (OCIFetchinto($curs,$r,OCI_ASSOC+OCI_RETURN_NULLS)) { foreach ( $r as $k=$v ) print $v ; print br\n; } } ocifreecursor($curs); ? the PL/SQL code for the function: create or replace type menserro is varray(20) of varchar2(100); function sel(p_cursor out ufcurtyp, p_cod_uf in uf.cod_uf%type ) return menserro is v_sql varchar2(200); v_menserro menserro := menserro(); begin v_sql := 'select * from uf'; if p_cod_uf is not null then v_sql := v_sql || ' where cod_uf='''|| p_cod_uf || ; end if; v_sql := v_sql || ' order by nom_uf'; open p_cursor for v_sql; return null; exception when others then begin v_menserro.extend; v_menserro(v_menserro.count) := 'Erro na execução do select'; return v_menserro; end; end sel; Andries Algera CSR - IBAMA SAIN L4, Lote 4, Ed. IBAMA Sede 70800.200 Brasilia / DF BRASIL ph: +5561 316-1326 316-1453 fax:+5561 223-7108 -- PHP General 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] PHP mail() question?
function htmlemailheaders($from=somename[EMAIL PROTECTED],$CC=,$BCC=){ //three arguments, last two optional // http://www.mindspring.com/~mgrand/mime.html voor mime specificaties $mailheaders = NULL;//initi $mailheaders .= From: $from\r\n;//waarde van eerste argument van de functie $mailheaders .= Reply-To: $from\r\n; //$mailheaders .= Return-Path: $from\r\n; //$mailheaders .= Return-Receipt-To: $from\r\n; $mailheaders .= MIME-Version: 1.0 \r\n; // $mailheaders .= X-Mailer: Register PHP by DPDK\r\n; //mailer $mailheaders .= X-Priority: 3\r\n; //1 UrgentMessage, 3 Normal $mailheaders .= Content-type: text/html;charset=us-ascii \r\n;//charset=iso-8859-1 $mailheaders .= Content-Transfer-Encoding: 7bit \r\n; //add more headers if($CC!=) { $mailheaders .= Cc: $CC\r\n;//tweede argument, alleen toevoegen als er een waarde voor is } if($BCC!=) { $mailheaders .= Bcc: $BCC\r\n;//derde argument, BCC altijd achteraan de headers } return $mailheaders;//function returns the headers, either store them in variable or use in php mail() function }//end function htmlemailheaders()- -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php