Re: [PHP-DB] supernoob strikes again

2004-05-08 Thread Dan Bowkley
The 404 page is also inserted into the template, or at least that's the
idea...index.html?id=404 is the error page.  ?id=1 is the main page, other
pages are numbered accordingly.


- Original Message - 
From: "Justin Gruenberg" <[EMAIL PROTECTED]>
To: "Dan Bowkley" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, May 08, 2004 11:05 PM
Subject: Re: [PHP-DB] supernoob strikes again


> Dan Bowkley wrote:
>
> >Yeah, I'm back...
> >
> >I'm revamping my own site, finally...going for the same sort of dynamic
system I was using for my last creation.  Currently, I have index.php
returning lots of different pages from a mysql database; what I'd like to do
is have a somewhat more elegant solution for spitting back a 404 page.
> >
> >
>
> I'm not entirely sure if I understand your problem, but I can try.  It's
> a bit late.
>
> What you need is to test to see if 0 rows are returned.  Do this before
> any HTML is outputted.  You can use header("HTTP/1.0 404 Not Found") to
> tell the browser that the page wasn't found.  You want to stop any
> output after that, too.  If you use Apache, you can use a custom error
> document to give a pretty error page.
>
> See
> http://us4.php.net/manual/en/function.header.php
> http://httpd.apache.org/docs/mod/core.html#errordocument
>
>
>
>

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



Re: [PHP-DB] supernoob strikes again

2004-05-08 Thread Justin Gruenberg
Dan Bowkley wrote:

Yeah, I'm back...

I'm revamping my own site, finally...going for the same sort of dynamic system I was using for my last creation.  Currently, I have index.php returning lots of different pages from a mysql database; what I'd like to do is have a somewhat more elegant solution for spitting back a 404 page.
 

I'm not entirely sure if I understand your problem, but I can try.  It's 
a bit late.

What you need is to test to see if 0 rows are returned.  Do this before 
any HTML is outputted.  You can use header("HTTP/1.0 404 Not Found") to 
tell the browser that the page wasn't found.  You want to stop any 
output after that, too.  If you use Apache, you can use a custom error 
document to give a pretty error page.

See
http://us4.php.net/manual/en/function.header.php
http://httpd.apache.org/docs/mod/core.html#errordocument
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] supernoob strikes again

2004-05-08 Thread Dan Bowkley
Yeah, I'm back...

I'm revamping my own site, finally...going for the same sort of dynamic system I was 
using for my last creation.  Currently, I have index.php returning lots of different 
pages from a mysql database; what I'd like to do is have a somewhat more elegant 
solution for spitting back a 404 page.

The way it works now, is a hard-coded list in index.php; if you ask for page id 1 it 
gives page id1, 2 returns 2, etc, for every page that exists.  If you ask for a 
nonexistant page it asks for 404, and spits back the contents for the error page.  
What I'd like to do is have it look in the database, determine whether or not the page 
you asked for exists, and then return either the page you asked for or the 404 
page...so I can just add a new page to the database without having to edit the php 
everytime.

The script is currently living at 
http://www.dibcomputers.com/new-dibcomputers/index.php and I've got it also 
retrievable as a text file at the above url with .txt appended.

I know there's an easy way to do this...I'm just braindead at the moment.  Staring at 
this thing for too long I guess.  :)

Thanks in advance,
Dan the Noob

Re: [PHP-DB] another strange MYSQL problem

2004-05-08 Thread John W. Holmes
[EMAIL PROTECTED] wrote:

First, I use this, and all is ok:

SELECT * FROM modele WHERE marca='Aprilia' ORDER BY tip ASC.

Then, I use this:

SELECT  * FROM modele WHERE marca='Cagiva' ORDER BY tip ASC

and the records are not ordered ascending by the field tip. In the
first case, the records were ordered. Anyone knows what is wrong?
Thank you!
> The first query works perfectly. The second returns no results. The
> data type for 'tip' is text.
Then you have no rows where marca is equal to 'Cagiva'...

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

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


Re[2]: [PHP-DB] another strange MYSQL problem

2004-05-08 Thread mariuspa
I answered to the wrong topic for you too. They aren't sorted, at
least they aren't sorted after the field 'tip'

Best regards,
Marius

RZ> Run those queries again and send in the result set. Maybe they're being sorted
RZ> but it looks off, also what is the data type for you 'tip' column. Post your db
RZ> schema if possible.


R>>

RZ> Quoting Marcjon Louwersheimer <[EMAIL PROTECTED]>:

>> 
>> 
>> 
>> - Original message -
>> From: [EMAIL PROTECTED]
>> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
>> Date: Sat, 8 May 2004 23:23:05 +0300
>> Subject: [PHP-DB] another strange MYSQL problem
>> 
>> Hello,
>> 
>> First, I use this, and all is ok:
>> 
>> SELECT * FROM modele WHERE marca='Aprilia' ORDER BY tip ASC.
>> 
>> Then, I use this:
>> 
>> SELECT  * FROM modele WHERE marca='Cagiva' ORDER BY tip ASC
>> 
>> and the records are not ordered ascending by the field tip. In the
>> first case, the records were ordered. Anyone knows what is wrong?
>> Thank you!
>> 
>> Best regards,
>> Marius Panaitescu
>> 
>> -- 
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
>> Well, this might not answer your question (or it might) but you should
>> not use * in your queries. Specify each column you want to retrieve. This
>> also might fix you problem, but I'm not sure.
>> -- 
>>   Marcjon
>> 
>> -- 
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 




RZ> -



-- 
Best regards,
 mariuspamailto:[EMAIL PROTECTED]

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



Re[2]: [PHP-DB] another strange MYSQL problem

2004-05-08 Thread mariuspa
Hello Marcjon,

Sunday, May 9, 2004, 12:13:05 AM, you wrote:




ML> - Original message -
ML> From: [EMAIL PROTECTED]
ML> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
ML> Date: Sat, 8 May 2004 23:23:05 +0300
ML> Subject: [PHP-DB] another strange MYSQL problem

ML> Hello,

ML> First, I use this, and all is ok:

ML> SELECT * FROM modele WHERE marca='Aprilia' ORDER BY tip ASC.

ML> Then, I use this:

ML> SELECT  * FROM modele WHERE marca='Cagiva' ORDER BY tip ASC

ML> and the records are not ordered ascending by the field tip. In the
ML> first case, the records were ordered. Anyone knows what is wrong?
ML> Thank you!

ML> Best regards,
ML> Marius Panaitescu

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

ML> Well, this might not answer your question (or it might) but you should
ML> not use * in your queries. Specify each column you want to retrieve. This
ML> also might fix you problem, but I'm not sure.
ML> -- 
ML>   Marcjon


Sorry...wrong topic. I will try to not use * and i will let you know
if this solves the problem. Thanks.

Best regards,
Marius

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



Re[2]: [PHP-DB] another strange MYSQL problem

2004-05-08 Thread mariuspa
Hello Marcjon,

Sunday, May 9, 2004, 12:13:05 AM, you wrote:




ML> - Original message -
ML> From: [EMAIL PROTECTED]
ML> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
ML> Date: Sat, 8 May 2004 23:23:05 +0300
ML> Subject: [PHP-DB] another strange MYSQL problem

ML> Hello,

ML> First, I use this, and all is ok:

ML> SELECT * FROM modele WHERE marca='Aprilia' ORDER BY tip ASC.

ML> Then, I use this:

ML> SELECT  * FROM modele WHERE marca='Cagiva' ORDER BY tip ASC

ML> and the records are not ordered ascending by the field tip. In the
ML> first case, the records were ordered. Anyone knows what is wrong?
ML> Thank you!

ML> Best regards,
ML> Marius Panaitescu

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

ML> Well, this might not answer your question (or it might) but you should
ML> not use * in your queries. Specify each column you want to retrieve. This
ML> also might fix you problem, but I'm not sure.
ML> -- 
ML>   Marcjon


  I didn't use * to retrieve fields. I used it the first time, but
  no results again. When i retrieved just the field i needed, it
  worked, but if i try to retrieve 'id' field, the query returns no
  results.

  Best regards,
  Marius

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



Re[2]: [PHP-DB] another strange MYSQL problem

2004-05-08 Thread mariuspa
The first query works perfectly. The second returns no results. The
data type for 'tip' is text.

Regards,
Marius

RZ> Run those queries again and send in the result set. Maybe they're being sorted
RZ> but it looks off, also what is the data type for you 'tip' column. Post your db
RZ> schema if possible.


R>>

RZ> Quoting Marcjon Louwersheimer <[EMAIL PROTECTED]>:

>> 
>> 
>> 
>> - Original message -
>> From: [EMAIL PROTECTED]
>> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
>> Date: Sat, 8 May 2004 23:23:05 +0300
>> Subject: [PHP-DB] another strange MYSQL problem
>> 
>> Hello,
>> 
>> First, I use this, and all is ok:
>> 
>> SELECT * FROM modele WHERE marca='Aprilia' ORDER BY tip ASC.
>> 
>> Then, I use this:
>> 
>> SELECT  * FROM modele WHERE marca='Cagiva' ORDER BY tip ASC
>> 
>> and the records are not ordered ascending by the field tip. In the
>> first case, the records were ordered. Anyone knows what is wrong?
>> Thank you!
>> 
>> Best regards,
>> Marius Panaitescu
>> 
>> -- 
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
>> Well, this might not answer your question (or it might) but you should
>> not use * in your queries. Specify each column you want to retrieve. This
>> also might fix you problem, but I'm not sure.
>> -- 
>>   Marcjon
>> 
>> -- 
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>> 




RZ> -




-- 
Best regards,
 mariuspamailto:[EMAIL PROTECTED]

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



Re: [PHP-DB] another strange MYSQL problem

2004-05-08 Thread Radek Zajkowski
Run those queries again and send in the result set. Maybe they're being sorted
but it looks off, also what is the data type for you 'tip' column. Post your db
schema if possible.


R>

Quoting Marcjon Louwersheimer <[EMAIL PROTECTED]>:

> 
> 
> 
> - Original message -
> From: [EMAIL PROTECTED]
> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
> Date: Sat, 8 May 2004 23:23:05 +0300
> Subject: [PHP-DB] another strange MYSQL problem
> 
> Hello,
> 
> First, I use this, and all is ok:
> 
> SELECT * FROM modele WHERE marca='Aprilia' ORDER BY tip ASC.
> 
> Then, I use this:
> 
> SELECT  * FROM modele WHERE marca='Cagiva' ORDER BY tip ASC
> 
> and the records are not ordered ascending by the field tip. In the
> first case, the records were ordered. Anyone knows what is wrong?
> Thank you!
> 
> Best regards,
> Marius Panaitescu
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> Well, this might not answer your question (or it might) but you should
> not use * in your queries. Specify each column you want to retrieve. This
> also might fix you problem, but I'm not sure.
> -- 
>   Marcjon
> 
> -- 
> 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] another strange MYSQL problem

2004-05-08 Thread Marcjon Louwersheimer



- Original message -
From: [EMAIL PROTECTED]
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
Date: Sat, 8 May 2004 23:23:05 +0300
Subject: [PHP-DB] another strange MYSQL problem

Hello,

First, I use this, and all is ok:

SELECT * FROM modele WHERE marca='Aprilia' ORDER BY tip ASC.

Then, I use this:

SELECT  * FROM modele WHERE marca='Cagiva' ORDER BY tip ASC

and the records are not ordered ascending by the field tip. In the
first case, the records were ordered. Anyone knows what is wrong?
Thank you!

Best regards,
Marius Panaitescu

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

Well, this might not answer your question (or it might) but you should
not use * in your queries. Specify each column you want to retrieve. This
also might fix you problem, but I'm not sure.
-- 
  Marcjon

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



[PHP-DB] another strange MYSQL problem

2004-05-08 Thread mariuspa
Hello,

First, I use this, and all is ok:

SELECT * FROM modele WHERE marca='Aprilia' ORDER BY tip ASC.

Then, I use this:

SELECT  * FROM modele WHERE marca='Cagiva' ORDER BY tip ASC

and the records are not ordered ascending by the field tip. In the
first case, the records were ordered. Anyone knows what is wrong?
Thank you!

Best regards,
Marius Panaitescu

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



Re[2]: [PHP-DB] mysql - SELECT DISTINCT problem

2004-05-08 Thread mariuspa
This wouldn't be posible either, because the argument for Distinct
is tip, so other fields will be ignored. But simply it can't retrieve
id. If i want to retrieve it also, it returns zero fields. Thank you
anyway.

Regards,
Marius Panaitescu

DC> Very odd.  I would think it would return every record seeing
DC> as the auto_increment ID field is different for every record.


>>>I use "SELECT DISTINCT tip, marca, model FROM modele" to select
>>>records without duplicates on the field "tip". This works ok, BUT if I
>>>use "SELECT DISTINCT tip, marca, model, id FROM..." (id is
>>>auto_increment and is the table's primary key) my query won't produce
>>>any result. ANyone has a clue? Thank you!




-- 
Best regards,
 mariuspamailto:[EMAIL PROTECTED]

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



Re: [PHP-DB] mysql - SELECT DISTINCT problem

2004-05-08 Thread Daniel Clark
Very odd.  I would think it would return every record seeing as the auto_increment ID 
field is different for every record.


>>I use "SELECT DISTINCT tip, marca, model FROM modele" to select
>>records without duplicates on the field "tip". This works ok, BUT if I
>>use "SELECT DISTINCT tip, marca, model, id FROM..." (id is
>>auto_increment and is the table's primary key) my query won't produce
>>any result. ANyone has a clue? Thank you!

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



Re: [PHP-DB] Re: how to parse php code stored in databases?

2004-05-08 Thread Daniel Clark
Torsten is right.  eval() works great ... and so does having your php code in the 
database :-)

>>"Florian Wagner" <[EMAIL PROTECTED]> wrote in message
>>news:[EMAIL PROTECTED]
>>> Hi there,
>>> I thought it would be a great idea to store the code of nearly all my web
>>> pages in "text" fields of a mysql database.
>>> Now I've got the problem that I want to use php in those pages.
>>> Let's say $row["content"] contains the string "".
>>> Then echo $row["content"] only produces the unparsed >World!'
>>> ?> which effectivly displays nothing, because the browser doesn't know the
>>> ">>
>>> Thanks for any suggestions...
>>
>>This can be done with eval():
>>http://de.php.net/manual/en/function.eval.php
>>
>>Take a look at the user comments there, especially regarding the inclusion
>>of .
>>
>>Regards, Torsten




Re: [PHP-DB] Re: Quik.com?? Spam?

2004-05-08 Thread Fernando Soto






I have an account with Quik Internet (www.quik.com) and I guess that's a message from my spam filter. I've have been problems with it.
 
Sorry for the inconveniences it causes.
 
Fer. 
 
---Mensaje original---
 

De: Uzi Klein
Fecha: 05/08/04 10:00:30
Para: [EMAIL PROTECTED]
Asunto: [PHP-DB] Re: Quik.com?? Spam?
 
 
"Florian Wagner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hi,
> I'm a little confused about two mails I got from a service named "quik".
It
> looks like spam but I wonder how they got to know the headlines of the two
> messages I wrote in this mailing list...does anybody know how they're
doing
> this?
 
Same happend to me.
no idea
 
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
 
 







_  IncrediMail - El Email ha evolucionado finalmente - Haga clic aquí

[PHP-DB] Re: Quik.com?? Spam?

2004-05-08 Thread Uzi Klein

"Florian Wagner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> I'm a little confused about two mails I got from a service named "quik".
It
> looks like spam but I wonder how they got to know the headlines of the two
> messages I wrote in this mailing list...does anybody know how they're
doing
> this?

Same happend to me.
no idea

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



[PHP-DB] Quik.com?? Spam?

2004-05-08 Thread Florian Wagner
Hi,
I'm a little confused about two mails I got from a service named "quik". It
looks like spam but I wonder how they got to know the headlines of the two
messages I wrote in this mailing list...does anybody know how they're doing
this?

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



[PHP-DB] Re: mysql - SELECT DISTINCT problem

2004-05-08 Thread Mookstah

<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> I use "SELECT DISTINCT tip, marca, model FROM modele" to select
> records without duplicates on the field "tip". This works ok, BUT if I
> use "SELECT DISTINCT tip, marca, model, id FROM..." (id is
> auto_increment and is the table's primary key) my query won't produce
> any result. ANyone has a clue? Thank you!

DISTINCT is ment for the total ressult, not for 1 field
maybe try "GROUP BY tip" for a better result.


>
> Best regards,
> Marius Panaitescu

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



[PHP-DB] mysql - SELECT DISTINCT problem

2004-05-08 Thread mariuspa
Hello,

I use "SELECT DISTINCT tip, marca, model FROM modele" to select
records without duplicates on the field "tip". This works ok, BUT if I
use "SELECT DISTINCT tip, marca, model, id FROM..." (id is
auto_increment and is the table's primary key) my query won't produce
any result. ANyone has a clue? Thank you!

Best regards,
Marius Panaitescu

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



[PHP-DB] Re: merging a table from multiple servers

2004-05-08 Thread Seth Bembeneck
How would I generate the file?
Make each record 1 line in the file?

After the file is created, how do I download it?

Thanks,

Seth

"Kim Steinhaug" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I would imagine the best way would be a system that triggers a
> script on the different serveres. This script creates a datafile
> which you import with fopen and then you create the database
> set you need to generate nice stats from.
>
> Else you would need the different servers to accept incoming
> connections on their MySQL from your host, which I would think
> would be alot of work to accomplish. Preparing datasets on the
> different servers with a script sounds much more simple in my
> opinion, after all this script will only be "updated" at given
> intervals.
>
> -- 
> -- 
> Kim Steinhaug
> --
> There are 10 types of people when it comes to binary numbers:
> those who understand them, and those who don't.
> --
> www.steinhaug.com - www.easywebshop.no - www.webkitpro.com
> --
>
> "Seth Bembeneck" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I'm trying to work on a project that gathers info from different
servers,
> > then combines them and displays it.
> >
> > Is it possble to merge the tables from the different servers into 1
table
> > using php?
> >
> > My one solution to this was to have a php script on each server, then
have
> > my website call each php script, retrieve the info then insert it into
my
> > database.
> >
> > For a glimps of the amount of data I'm trying to merge:
> > http://cwhq.net/index.php?action=stats&mod=kill_stats_totals
> >
> > Now imagine 10 different servers with similer data.
> >
> > I'm trying to provide a way for Deltaforce Gamers to see their stat from
> all
> > the game servers that collect the stats in 1 location.
> >
> > Thanks,
> >
> > Seth
> >


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



[PHP-DB] solved

2004-05-08 Thread Florian Wagner
"Torsten Roehr" <[EMAIL PROTECTED]> schrieb im Newsbeitrag >
> This can be done with eval():
> http://de.php.net/manual/en/function.eval.php
>
> Take a look at the user comments there, especially regarding the inclusion
> of .
>

That was extremely useful :) thank you so much
I now use the function "eval_html" posted at the address mentioned by
torsten and it works fine!
Looks like these users at php.net know what they're talking about ;)

Bye

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



[PHP-DB] Re: how to parse php code stored in databases?

2004-05-08 Thread Torsten Roehr
"Florian Wagner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi there,
> I thought it would be a great idea to store the code of nearly all my web
> pages in "text" fields of a mysql database.
> Now I've got the problem that I want to use php in those pages.
> Let's say $row["content"] contains the string "".
> Then echo $row["content"] only produces the unparsed  ?> which effectivly displays nothing, because the browser doesn't know the
> "
> Thanks for any suggestions...

This can be done with eval():
http://de.php.net/manual/en/function.eval.php

Take a look at the user comments there, especially regarding the inclusion
of .

Regards, Torsten

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



[PHP-DB] how to parse php code stored in databases?

2004-05-08 Thread Florian Wagner
Hi there,
I thought it would be a great idea to store the code of nearly all my web
pages in "text" fields of a mysql database.
Now I've got the problem that I want to use php in those pages.
Let's say $row["content"] contains the string "".
Then echo $row["content"] only produces the unparsed  which effectivly displays nothing, because the browser doesn't know the
"http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] From MySQL to PostgreSQL

2004-05-08 Thread Martin Marques
El Vie 07 May 2004 22:49, Marcjon Louwersheimer escribió:
> Hi. I developed a forum using php5 and mysql. Right now I'm hosting it on
> my computer, for version for myself and another for a school I volunteer
> at. I would like to move the forums to the school's server. Apperently
> they don't have MySQL, they have PostgreSQL. I was just wondering, how
> much like MySQL is PostgreSQL? Would it be possible to create general
> functions (MySQL style) that could also work for PostgreSQL, based on
> what a config file set? Right now I have a file that's specific to each
> forum, so I could specify PostgreSQL or MySQL and based on that the
> function would do the appropriate action. So how much like MySQL is
> PostgreSQL?

I think you should check PEAR::DB to get some DB abstraction.

-- 
 09:30:01 up 9 days, 14:52,  1 user,  load average: 0.27, 0.39, 0.45
-
Martín Marqués| select 'mmarques' || '@' || 'unl.edu.ar'
Centro de Telematica  |  DBA, Programador, Administrador
 Universidad Nacional
  del Litoral
-

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



[PHP-DB] Re: From MySQL to PostgreSQL

2004-05-08 Thread Torsten Roehr
"Marcjon Louwersheimer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi. I developed a forum using php5 and mysql. Right now I'm hosting it on
> my computer, for version for myself and another for a school I volunteer
> at. I would like to move the forums to the school's server. Apperently
> they don't have MySQL, they have PostgreSQL. I was just wondering, how
> much like MySQL is PostgreSQL? Would it be possible to create general
> functions (MySQL style) that could also work for PostgreSQL, based on
> what a config file set? Right now I have a file that's specific to each
> forum, so I could specify PostgreSQL or MySQL and based on that the
> function would do the appropriate action. So how much like MySQL is
> PostgreSQL?

Hi Marcjon,

I can't answer your question regarding the difference of MySQL and
PostgreSQL but using a database abstraction layer like PEAR::DB should solve
your problem:

http://pear.php.net/package/DB


Regards, Torsten

> --
>   Marcjon

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