[PHP-DB] Re: Showing various result from a mysql query

2005-10-03 Thread annA

Hi Juan,

I haven't read the list for a 'few' days so I'm sorry if you've been 
sweating over this, but if you haven't yet solved it then make sure you 
send a


Header("Content-type: application/x-www-urlform-encoded");

before your

echo $rString;

annA


Subject:
Showing various result from a mysql query
From:
Juan Stiller <[EMAIL PROTECTED]>
Date:
Thu, 29 Sep 2005 20:11:27 + (GMT)
To:
php-db@lists.php.net

Hi, im working on a php file that its supposed to
retrieve data from a mysql database, to send it to a
flash animation to show the results. Thing is that im
testing some modifications to the code, so if there is
more than one entry, it shows all the results.

For some reason probably a mistake on the code im
getting this output when i try the muestra.php file on
the browser:

n=1&Hora0=17:30:43&Apellido0=garofalo&Id0=6&Dia0=28&Mes0=9&Ano0=2005&Nombre0=cristian&Destinatario0=martan=1&Hora0=17:30:43&Apellido0=garofalo&Id0=6&Dia0=28&Mes0=9&Ano0=2005&Nombre0=cristian&Receptor0=marilun=1&Hora0=17:30:43&Apellido0=garofalo&Id0=6&Dia0=28&Mes0=9&Ano0=2005&Nombre0=cristian&Destinatario0=martan=1&Hora0=17:30:43&Apellido0=garofalo&Id0=6&Dia0=28&Mes0=9&Ano0=2005&Nombre0=cristian

This might not be wrong, but when i show info on the
flash animation i get eg:

Apellido0=garofalo , i dont want to get the n=x on the
output, its supposed to be just an internal thing to
tell flash that for the variable Apellido(lastname)
there is more than one result and then to show all of
them.


This is the php code:

No se pudo conectar " .
"al servidor MySQL." );
exit();
}

if (! @mysql_select_db("llamadas") ) {
echo( "No se puede encontrar " .
"la base de datos clientes!" );
exit();
}

$qr = mysql_query("select * from datos");
$nrows =
mysql_num_rows($qr);
$rString = "n=".$nrows;
for ($i=0; $i < $nrows; $i++) {
$row = mysql_fetch_array($qr);
$rstring .= "&Id".$i."=".$row['id'];
$rString .=
"&Dia".$i."=".$row['dia']."&Mes".$i."=".$row['mes']."&Ano".$i."=".$row['ano'];
$rString .=
"&Hora".$i."=".$row['hora']."&Minutos".$i."=".$row['minutos'];
$rString .= "&Receptor".$i."=".$row['receptor'].
$rString .=
"&Destinatario".$i."=".$row['destinatario'].
$rString .= "&Apellido".$i."=".$row['apellido'].
$rstring .= "&Nombre".$i."=".$row['nombre'];
$rstring .= "&Telefono".$i."=".$row['telefono'];
$rstring .= "&Asunto".$i."=".$row['asunto'];
}
echo $rString;
mysql_free_result($qr);
?>

Also, i was told that including password and user to
connect to mysql server sholdn´t be shown on the php
file, so i have to use include_one and the file, but i
don´t know exaclty the syntax, can anybody help me
with it?

Thanks in advance.








___
1GB gratis, Antivirus y Antispam
Correo Yahoo!, el mejor correo web del mundo
http://correo.yahoo.com.ar

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



[PHP-DB] PHP email client

2005-10-03 Thread JeRRy
Hello,
 
What I am looking for is to offer a website that people can freely signup and 
use as a real email address.  A client where they can send/recieve emails just 
like Yahoo! Mail and Hotmail etc.  Have it web based.  But I don't just want 
any email client, it must be customizable and code added to it.  So I am not 
looking to go to a www site and signup for them to brand it.  I want to 
customize it entiley which does not just include the colours and format I mean 
customize the code itself and add to it as it won't just be a email site, it 
will pay you to send emails etc.  
 
Free or price is fine.  I know of a few BASIC free ones but their very basic.  
If I can avoid allowing attachments that's fine or a section to allow or 
disallow ataachments.  But when is ay basic their damn basic.  I need one that 
you have settings, folders etc.  
 
Any ideas?  Or anyone have the time to write such a client for me?
 
I'm not really sure if the client can be or would be PHP based or datbase 
driven.  I'd hope so because I could adapt to it better and work on it but if 
not I am willing to learn the bits.  
 
Time frame?  Well if someone needs to write it I don't need it anytime soon.  I 
want it to be stable and what not so needs to be fine and operate correctly.  
But if I can buy or get some code I can edit there will be alot of editing but 
that would be fine.  Any ideas people?
 
email will be in the form of [EMAIL PROTECTED] not like [EMAIL PROTECTED] it's 
going to have it's own domain.
 
Something like rock.com would be fine.
 
Thanks!  
 
Jerry


-
Do you Yahoo!?
Find a local business fast with Yahoo! Local Search

[PHP-DB] Broken pipe after long db process

2005-10-03 Thread Ben-Nes Yonatan
Hi all,

I wrote a php script which is running very long queries (hours) on a
postgresql database.
I seem to have a problem to run the code when there are single queries
which take long times (like 5 hours for an update query), from the log
of the database I received the following code:

2005-09-30 17:12:13 IDT postgres : LOG:  0: duration: 18730038.678
ms  statement: UPDATE product_temp SET nleft=(SELECT
2005-09-30 17:12:13 IDT postgres : LOCATION:  exec_simple_query,
postgres.c:1035
2005-09-30 17:12:13 IDT postgres : LOG:  08006: could not send data to
client: Broken pipe
2005-09-30 17:12:13 IDT postgres : LOCATION:  internal_flush, pqcomm.c:1050
2005-09-30 17:12:13 IDT postgres : LOG:  08P01: unexpected EOF on client
connection
2005-09-30 17:12:13 IDT postgres : LOCATION:  SocketBackend, postgres.c:287
2005-09-30 17:12:13 IDT postgres : LOG:  0: disconnection: session
time: 6:04:58.52
2005-09-30 17:12:13 IDT postgres : LOCATION:  log_disconnections,
postgres.c:3403

Now after the 5 hours update it need to echo into a log file a line
which say that it ended the current command (just for me to know the times), my
assumption is that PHP read the code into memory at start and opened the
connection to the file, after a time which he waited to any given "life
sign" he gave up and closed the connection to the file, and when the
code came back to the file it encountered no connection to the file
(broken pipe).

Or a newer assumption... though I did set max_execution_time to 0 (endlessly) 
it does close itself up after waiting to much time for the database response, 
and when the database do respond the php client is closed already and I receive 
the broken pipe error.

Am I correct at my assumption? if so how can I set the PHP to wait how
much I tell him?
Ofcourse if im wrong I would like to know the reason also :)


Thanks in advance,
  Ben-Nes Yonatan


Re: [PHP-DB] Pagination problems

2005-10-03 Thread Rui Cruz
The mssql_fetch_row works with an MS Access database?

Because I'm have the same problem while trying to paginate results. I always 
read the whole results into an array an then I break them up using the 
array.

This is a stupid and slow solution, but how could one overcome this?


""Pablo M. Rivas"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
Hello Jenaro:
First off all (i'ts not exactly your question), but i think you don't
need to make this big array:

$my_array[] ="";
while ($row = mssql_fetch_object($rs)){
   $my_array[]="$row->tId";
}

'cause you don't need it... you may directly do something like this:
$counter=0;
while ($row=mssql_fetch_row($rs)) {
  if (($counter>=$start) and ($counter<($start+ $Page_Size)) {
echo "";
//There you go: Show all fields, one to each cell
echo "" . implode("",$row) . "";
echo "\n";
 }
}

To read: http://www.php.net/implode
http://ar.php.net/mssql_fetch_row

Pablo.

On 9/2/05, Jenaro Centeno Gómez <[EMAIL PROTECTED]> wrote:
>  Hello everybody,
>
>  This is my first message to the list and as usual is to try to solve a
> problem.
>
>  I am using PHP+IIS+SQLServer on windows platform (no choice at the moment
> :(...)
>  Wel, I am trying to paginate some results this is the code:
>
>$conn = mssql_connect("myserver", "myuser", "mypassword");
>  mssql_select_db("database");
>  $Page_Size = 20;
>
>  $page = $_GET["page"];
>  if (!$page) {
>  $start = 0;
>  $page=1;
>  }
>  else {
>  $start = ($page - 1) * $Page_Size;
>  }
>  //This is my query, ordered of course
>  $ssql = "select * from table ORDER by Name";
>  $rs = mssql_query($ssql,$conn);
>  $total_records = mssql_num_rows($rs);
>
>  $total_pages = ceil($total_records / $Page_Size);
>
>  echo "Número de registros encontrados: " . $total_records . "";
>  echo "Se muestran páginas de " . $Page_Size . " registros cada una";
>  echo "Mostrando la página " . $page . " de " . $total_pages . "";
>
>  $rs = mssql_query($ssql,$conn);
>
>  $my_array[] ="";
>  while ($row = mssql_fetch_object($rs)){
>  $my_array[]="$row->tId";
>  }
>
>  mssql_free_result($rs);
>  mssql_close($conn);
>
>  $contarray=1;
>
>  The extracted data in the query is sent to the array
>  and here is my problem because I need to know how to send all the fields 
> to
> put
>  every field in a different cell in the table, no just one field
>
>  foreach ($my_array as $idarray=> $Id){
>  //this is my verification used instead of the LIMIT clausule of mysql
>
>  if ($idarray > $start && $contarray <= $Page_Size){
>  echo "$Id";
> $contarray++;
>  }
>  }
>  ?>
>  
>if ($total_pages > 1){
>  for ($i=1;$i<=$total_pages;$i++){
> if ($page == $i){
>echo $page . " | ";
> }else{
>echo "" . $i . " 
> |
> ";
> }
>  }
>  }
>  ?>
>
>  
>  
>
>  I am almost new to PHP (1 day working with it, so maybe newbie is the 
> rigth
> word)
>
>  Thanks in advance.
>
>  -- 
>  L.A. Jenaro Centeno Gómez
> Alimentos La Concordia, S.A. de C.V.
> Loma de Prados No. 1332
> Col. La Marimba
> Lagos de Moreno, Jal.
> C.P. 47470
> Tel.- 01 474 741 92 00 Ext. 9280
>
>
> La informacion contenida en este mensaje y sus anexos es de caracter 
> privado
> y confidencial y para el uso exclusivo de la persona o institucion a la 
> cual
> ha sido enviado y para otros autorizados para recibirlo, por lo que no 
> podra
> distribuirse sin la autorizacion expresa del remitente. Si usted no es el
> destinatario a quien este mensaje fue dirigido o si no es un empleado
> responsable del envio de este mensaje al destinatario, se hace de su
> conocimiento que cualquier revision, diseminacion, distribucion, copia u
> otro uso o acto realizado con base en o relacionado con el contenido de 
> este
> mensaje y sus anexos está estrictamente prohibida y puede ser ilegal.
> Asimismo, el presente mensaje no representa la manifestacion del
> consentimiento de ninguna de las partes, por lo que no genera derecho u
> obligación alguna para ambas sino hasta que sus representantes legales asi
> lo manifiesten por escrito. Si usted ha recibido este comunicado y sus
> anexos por error, le soli
> citamos lo notifique inmediatamente al remitente respondiendo a este 
> correo
> y borre el presente y sus anexos de su sistema sin conservar copia de los
> mismos. Se suprimieron acentos y caracteres especiales para legibilidad 
> del
> mismo. Gracias. Alimentos La Concordia, S.A. de C.V.
>
> The information contained in this message and its attachments is private 
> and
> confidential and is intended solely for the use of the individual or 
> entity
> to whom it is addressed and others who are authorized to receive it;
> therefore, its distribution cannot be possible without authorization from
> the sender. If you are not the intended recipient or an employee 
> responsible
> for delivering this message to the intended recipient, you are hereby
> notified that any revision

Re: [PHP-DB] PHP Forms - upload VS text

2005-10-03 Thread Rui Cruz
ok, thank you so much, I believe that I've got it now.


""Norland, Martin"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

Ahh, ignore that - our tpl() is an echo() replacement that our codebase
has, which can take parameters to do fun things.  There's no logical
reason to use it in this place, except it's shorter  to type than echo,
and it's habit.

 Pay no attention to the man behind the curtain.

:)

cheers,
- Martin Norland, Sys Admin / Database / Web Developer, International
Outreach x3257

The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.


-Original Message-
From: Rui Cruz [mailto:[EMAIL PROTECTED]
Sent: Friday, September 30, 2005 10:26 AM
To: php-db@lists.php.net
Subject: Re: [PHP-DB] PHP Forms - upload VS text. .

Humm.. in the form action you use a function called tpl();

What function is that, I find no reference of it on the php.net function

list.


- Original Message - 
From: ""Norland, Martin"" <[EMAIL PROTECTED]>
Newsgroups: php.db
To: 
Sent: Friday, September 30, 2005 3:36 PM
Subject: RE: [PHP-DB] PHP Forms - upload VS text




Beyond that it's just the $_FILES array and $_POST array.

cheers,
- Martin Norland, Sys Admin / Database / Web Developer, International
Outreach x3257

The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.


-Original Message-
From: Rui Cruz [mailto:[EMAIL PROTECTED]
Sent: Friday, September 30, 2005 8:18 AM
To: php-db@lists.php.net
Subject: [PHP-DB] PHP Forms - upload VS text. .

Hi, I'm a fairlly experienced developer but there's something that just
really gets to me...

I can:

- Use a form to upload a file or files
- Use a form to write text to whaever is needed (DB, e-mail
contents,
etc...)

but I CAN'T

- Use the same form to do both.

I've tried so many diferent things and never got my scripts to upload a
file
and insert data to a DB.

I find it dificult to accept this. Is this normal or am I doing things
wrong? Could anyone shed some light on this issue please?

-- 
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] PHP email client

2005-10-03 Thread Brent Baisley
SquirrelMail is used by a lot people and comes with a lot of systems  
(i.e. Apple Servers, Linux). It's not tied to any particular email  
server, it's open source and PHP based, so you can customize it to  
your needs.
The email address has to do with the email server, not the web front  
end. Postfix is a pretty popular email server that supports many  
configurations and is a heck of a lot easier to learn and setup than  
sendmail. dbMail is another interesting one that can use a database  
(mysql, postgres) as a back, which helps with searching large mail  
boxes or tying into a whole system.



On Oct 3, 2005, at 9:39 AM, JeRRy wrote:


Hello,

What I am looking for is to offer a website that people can freely  
signup and use as a real email address.  A client where they can  
send/recieve emails just like Yahoo! Mail and Hotmail etc.  Have it  
web based.  But I don't just want any email client, it must be  
customizable and code added to it.  So I am not looking to go to a  
www site and signup for them to brand it.  I want to customize it  
entiley which does not just include the colours and format I mean  
customize the code itself and add to it as it won't just be a email  
site, it will pay you to send emails etc.


Free or price is fine.  I know of a few BASIC free ones but their  
very basic.  If I can avoid allowing attachments that's fine or a  
section to allow or disallow ataachments.  But when is ay basic  
their damn basic.  I need one that you have settings, folders etc.


Any ideas?  Or anyone have the time to write such a client for me?

I'm not really sure if the client can be or would be PHP based or  
datbase driven.  I'd hope so because I could adapt to it better and  
work on it but if not I am willing to learn the bits.


Time frame?  Well if someone needs to write it I don't need it  
anytime soon.  I want it to be stable and what not so needs to be  
fine and operate correctly.  But if I can buy or get some code I  
can edit there will be alot of editing but that would be fine.  Any  
ideas people?


email will be in the form of [EMAIL PROTECTED] not like  
[EMAIL PROTECTED] it's going to have it's own domain.


Something like rock.com would be fine.

Thanks!

Jerry


-
Do you Yahoo!?
Find a local business fast with Yahoo! Local Search


--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577

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



Re: [PHP-DB] PHP email client

2005-10-03 Thread JeRRy
Thanks Brent,
 
Just for future refrence for this list if i look back on it or for others 
interest as well do you have direct links to the ones you have listed below?
 
I did a search and got third party addresses that did not seem to direct to the 
real address.  But that might of been the search terms I was using or the real 
sites were not available at the time I searched.
 
But the links would be handy and any costs assosicated to them.  SquirellMail I 
think I have heard about and is used in most CPANEL's.  But how customizable is 
this?  That is the sort of client I would need.  
I know Horde pretty well, is that customizable.
 
What I wanna do is add ads to all accounts and each time a user sees the ad 
they get credit, they don't need to click it to earn.  Something like that but 
with more detail.  So it needs to be able to add ads and to add PHP code and 
mysql code to it and be able to get basic info back from the email client to 
know who is logged in.
 
Jerry
Brent Baisley <[EMAIL PROTECTED]> wrote:
SquirrelMail is used by a lot people and comes with a lot of systems 
(i.e. Apple Servers, Linux). It's not tied to any particular email 
server, it's open source and PHP based, so you can customize it to 
your needs.
The email address has to do with the email server, not the web front 
end. Postfix is a pretty popular email server that supports many 
configurations and is a heck of a lot easier to learn and setup than 
sendmail. dbMail is another interesting one that can use a database 
(mysql, postgres) as a back, which helps with searching large mail 
boxes or tying into a whole system.


On Oct 3, 2005, at 9:39 AM, JeRRy wrote:

> Hello,
>
> What I am looking for is to offer a website that people can freely 
> signup and use as a real email address. A client where they can 
> send/recieve emails just like Yahoo! Mail and Hotmail etc. Have it 
> web based. But I don't just want any email client, it must be 
> customizable and code added to it. So I am not looking to go to a 
> www site and signup for them to brand it. I want to customize it 
> entiley which does not just include the colours and format I mean 
> customize the code itself and add to it as it won't just be a email 
> site, it will pay you to send emails etc.
>
> Free or price is fine. I know of a few BASIC free ones but their 
> very basic. If I can avoid allowing attachments that's fine or a 
> section to allow or disallow ataachments. But when is ay basic 
> their damn basic. I need one that you have settings, folders etc.
>
> Any ideas? Or anyone have the time to write such a client for me?
>
> I'm not really sure if the client can be or would be PHP based or 
> datbase driven. I'd hope so because I could adapt to it better and 
> work on it but if not I am willing to learn the bits.
>
> Time frame? Well if someone needs to write it I don't need it 
> anytime soon. I want it to be stable and what not so needs to be 
> fine and operate correctly. But if I can buy or get some code I 
> can edit there will be alot of editing but that would be fine. Any 
> ideas people?
>
> email will be in the form of [EMAIL PROTECTED] not like 
> [EMAIL PROTECTED] it's going to have it's own domain.
>
> Something like rock.com would be fine.
>
> Thanks!
>
> Jerry
>
>
> -
> Do you Yahoo!?
> Find a local business fast with Yahoo! Local Search

-- 
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577




-
Do you Yahoo!?
  Messenger 7.0: Free worldwide PC to PC calls

RE: [PHP-DB] PHP email client

2005-10-03 Thread Bastien Koert

horde? www.horde.org

bastien


From: JeRRy <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: [PHP-DB] PHP email client Date: Mon, 3 Oct 2005 23:39:42 +1000 
(EST)


Hello,

What I am looking for is to offer a website that people can freely signup 
and use as a real email address.  A client where they can send/recieve 
emails just like Yahoo! Mail and Hotmail etc.  Have it web based.  But I 
don't just want any email client, it must be customizable and code added to 
it.  So I am not looking to go to a www site and signup for them to brand 
it.  I want to customize it entiley which does not just include the colours 
and format I mean customize the code itself and add to it as it won't just 
be a email site, it will pay you to send emails etc.


Free or price is fine.  I know of a few BASIC free ones but their very 
basic.  If I can avoid allowing attachments that's fine or a section to 
allow or disallow ataachments.  But when is ay basic their damn basic.  I 
need one that you have settings, folders etc.


Any ideas?  Or anyone have the time to write such a client for me?

I'm not really sure if the client can be or would be PHP based or datbase 
driven.  I'd hope so because I could adapt to it better and work on it but 
if not I am willing to learn the bits.


Time frame?  Well if someone needs to write it I don't need it anytime 
soon.  I want it to be stable and what not so needs to be fine and operate 
correctly.  But if I can buy or get some code I can edit there will be alot 
of editing but that would be fine.  Any ideas people?


email will be in the form of [EMAIL PROTECTED] not like 
[EMAIL PROTECTED] it's going to have it's own domain.


Something like rock.com would be fine.

Thanks!

Jerry


-
Do you Yahoo!?
Find a local business fast with Yahoo! Local Search


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



Re: [PHP-DB] PHP email client

2005-10-03 Thread Brent Baisley
SqirrelMail is as customizable as you want, it's written in PHP and  
you get the source code. By default it comes with various preferences  
a user can change (i.e. color scheme). You can create folders if you  
setup it up as an IMAP account. The interface certainly isn't as  
fancy and dynamic as gmail or yahoo, but it's designed to work in  
just about any browser.
You could certainly add some ad display code to the interface, after  
all it is "just a web page".


sqirrelmail.org
dbmail.org
postfix.org
sendmail.org
mysql.com (everything can't be .org)

Price: free


On Oct 3, 2005, at 11:41 AM, JeRRy wrote:


Thanks Brent,

Just for future refrence for this list if i look back on it or for  
others interest as well do you have direct links to the ones you  
have listed below?


I did a search and got third party addresses that did not seem to  
direct to the real address.  But that might of been the search  
terms I was using or the real sites were not available at the time  
I searched.


But the links would be handy and any costs assosicated to them.   
SquirellMail I think I have heard about and is used in most  
CPANEL's.  But how customizable is this?  That is the sort of  
client I would need.

I know Horde pretty well, is that customizable.

What I wanna do is add ads to all accounts and each time a user  
sees the ad they get credit, they don't need to click it to earn.   
Something like that but with more detail.  So it needs to be able  
to add ads and to add PHP code and mysql code to it and be able to  
get basic info back from the email client to know who is logged in.


Jerry
Brent Baisley <[EMAIL PROTECTED]> wrote:
SquirrelMail is used by a lot people and comes with a lot of systems
(i.e. Apple Servers, Linux). It's not tied to any particular email
server, it's open source and PHP based, so you can customize it to
your needs.
The email address has to do with the email server, not the web front
end. Postfix is a pretty popular email server that supports many
configurations and is a heck of a lot easier to learn and setup than
sendmail. dbMail is another interesting one that can use a database
(mysql, postgres) as a back, which helps with searching large mail
boxes or tying into a whole system.


On Oct 3, 2005, at 9:39 AM, JeRRy wrote:

> Hello,
>
> What I am looking for is to offer a website that people can freely
> signup and use as a real email address. A client where they can
> send/recieve emails just like Yahoo! Mail and Hotmail etc. Have it
> web based. But I don't just want any email client, it must be
> customizable and code added to it. So I am not looking to go to a
> www site and signup for them to brand it. I want to customize it
> entiley which does not just include the colours and format I mean
> customize the code itself and add to it as it won't just be a email
> site, it will pay you to send emails etc.
>
> Free or price is fine. I know of a few BASIC free ones but their
> very basic. If I can avoid allowing attachments that's fine or a
> section to allow or disallow ataachments. But when is ay basic
> their damn basic. I need one that you have settings, folders etc.
>
> Any ideas? Or anyone have the time to write such a client for me?
>
> I'm not really sure if the client can be or would be PHP based or
> datbase driven. I'd hope so because I could adapt to it bette r and
> work on it but if not I am willing to learn the bits.
>
> Time frame? Well if someone needs to write it I don't need it
> anytime soon. I want it to be stable and what not so needs to be
> fine and operate correctly. But if I can buy or get some code I
> can edit there will be alot of editing but that would be fine. Any
> ideas people?
>
> email will be in the form of [EMAIL PROTECTED] not like
> [EMAIL PROTECTED] it's going to have it's own domain.
>
> Something like rock.com would be fine.
>
> Thanks!
>
> Jerry
>
>
> -
> Do you Yahoo!?
> Find a local business fast with Yahoo! Local Search

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577



Do you Yahoo!?
Messenger 7.0: Free worldwide PC to PC calls


--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577

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



Re: [PHP-DB] Pagination problems

2005-10-03 Thread Bastien Koert


Add an identtiy column to the table, then select all records from the table 
where the identity col is between the start and the start+number of rows to 
show



Bastien


From: "Rui Cruz" <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: Re: [PHP-DB] Pagination problems
Date: Mon, 3 Oct 2005 15:46:33 +0100

The mssql_fetch_row works with an MS Access database?

Because I'm have the same problem while trying to paginate results. I 
always

read the whole results into an array an then I break them up using the
array.

This is a stupid and slow solution, but how could one overcome this?


""Pablo M. Rivas"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hello Jenaro:
First off all (i'ts not exactly your question), but i think you don't
need to make this big array:

$my_array[] ="";
while ($row = mssql_fetch_object($rs)){
   $my_array[]="$row->tId";
}

'cause you don't need it... you may directly do something like this:
$counter=0;
while ($row=mssql_fetch_row($rs)) {
  if (($counter>=$start) and ($counter<($start+ $Page_Size)) {
echo "";
//There you go: Show all fields, one to each cell
echo "" . implode("",$row) . "";
echo "\n";
 }
}

To read: http://www.php.net/implode
http://ar.php.net/mssql_fetch_row

Pablo.

On 9/2/05, Jenaro Centeno Gómez <[EMAIL PROTECTED]> wrote:
>  Hello everybody,
>
>  This is my first message to the list and as usual is to try to solve a
> problem.
>
>  I am using PHP+IIS+SQLServer on windows platform (no choice at the 
moment

> :(...)
>  Wel, I am trying to paginate some results this is the code:
>
>$conn = mssql_connect("myserver", "myuser", "mypassword");
>  mssql_select_db("database");
>  $Page_Size = 20;
>
>  $page = $_GET["page"];
>  if (!$page) {
>  $start = 0;
>  $page=1;
>  }
>  else {
>  $start = ($page - 1) * $Page_Size;
>  }
>  //This is my query, ordered of course
>  $ssql = "select * from table ORDER by Name";
>  $rs = mssql_query($ssql,$conn);
>  $total_records = mssql_num_rows($rs);
>
>  $total_pages = ceil($total_records / $Page_Size);
>
>  echo "Número de registros encontrados: " . $total_records . "";
>  echo "Se muestran páginas de " . $Page_Size . " registros cada 
una";

>  echo "Mostrando la página " . $page . " de " . $total_pages . "";
>
>  $rs = mssql_query($ssql,$conn);
>
>  $my_array[] ="";
>  while ($row = mssql_fetch_object($rs)){
>  $my_array[]="$row->tId";
>  }
>
>  mssql_free_result($rs);
>  mssql_close($conn);
>
>  $contarray=1;
>
>  The extracted data in the query is sent to the array
>  and here is my problem because I need to know how to send all the 
fields

> to
> put
>  every field in a different cell in the table, no just one field
>
>  foreach ($my_array as $idarray=> $Id){
>  //this is my verification used instead of the LIMIT clausule of 
mysql

>
>  if ($idarray > $start && $contarray <= $Page_Size){
>  echo "$Id";
> $contarray++;
>  }
>  }
>  ?>
>  
>if ($total_pages > 1){
>  for ($i=1;$i<=$total_pages;$i++){
> if ($page == $i){
>echo $page . " | ";
> }else{
>echo "" . $i . 
"

> |
> ";
> }
>  }
>  }
>  ?>
>
>  
>  
>
>  I am almost new to PHP (1 day working with it, so maybe newbie is the
> rigth
> word)
>
>  Thanks in advance.
>
>  --
>  L.A. Jenaro Centeno Gómez
> Alimentos La Concordia, S.A. de C.V.
> Loma de Prados No. 1332
> Col. La Marimba
> Lagos de Moreno, Jal.
> C.P. 47470
> Tel.- 01 474 741 92 00 Ext. 9280
>
>
> La informacion contenida en este mensaje y sus anexos es de caracter
> privado
> y confidencial y para el uso exclusivo de la persona o institucion a la
> cual
> ha sido enviado y para otros autorizados para recibirlo, por lo que no
> podra
> distribuirse sin la autorizacion expresa del remitente. Si usted no es 
el

> destinatario a quien este mensaje fue dirigido o si no es un empleado
> responsable del envio de este mensaje al destinatario, se hace de su
> conocimiento que cualquier revision, diseminacion, distribucion, copia u
> otro uso o acto realizado con base en o relacionado con el contenido de
> este
> mensaje y sus anexos está estrictamente prohibida y puede ser ilegal.
> Asimismo, el presente mensaje no representa la manifestacion del
> consentimiento de ninguna de las partes, por lo que no genera derecho u
> obligación alguna para ambas sino hasta que sus representantes legales 
asi

> lo manifiesten por escrito. Si usted ha recibido este comunicado y sus
> anexos por error, le soli
> citamos lo notifique inmediatamente al remitente respondiendo a este
> correo
> y borre el presente y sus anexos de su sistema sin conservar copia de 
los

> mismos. Se suprimieron acentos y caracteres especiales para legibilidad
> del
> mismo. Gracias. Alimentos La Concordia, S.A. de C.V.
>
> The information contained in this message and its attachments is private
> and
> confidential and is intended solely for the use of the individual or
> entity
> to whom 

Re: [PHP-DB] Email Article, Print Article

2005-10-03 Thread Leo G. Divinagracia III

[EMAIL PROTECTED] wrote:


Hello,
 
I am running an article-based site, where I would like to add two buttons:  
print this article and email this article.
 
Does anyone know where I could look to find out how to program this code  
into my article.php page?
 
 


anothing this is to use CSS to strip out all of the fancy tables and 
graphics and stuff in the "printed" page option.


plus, i use this trick to read a site that separates the article into 
multipages.


when you click on the PRINTED option, it dumps the whole article into a 
graphics free format...  ;)


--
Leo G. Divinagracia III
[EMAIL PROTECTED]

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