[PHP-DB] Re: "resource ID #3"

2002-07-15 Thread Tomator

>  When I try to run any query
> on the second database, the only output I recieve is "resource id #3"  Any
> suggestions?

It happens when you are accesing to an emty table. Then $result will point
to "resource #3" where is no data.



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




[PHP-DB] PHP database

2002-07-15 Thread Tomator

Hello

I'm to have database, but server's administrator refuses to install MySQL
nor PHP MySQL support :( He told me he won't install it and I should use
textfiles if I want to have database. I don't want to write engine to
textfiles, so...

Can You point where can I find PHP code which realize basic database
functions without installing any not standard functions nor modules on
unix/linux server?



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




[PHP-DB] Re: change data before its sent to db?

2002-07-17 Thread Tomator

You will laugh. When you quote month, you don't sort date by month field.
You sort by "month" - text constant being always equal. In fact you son't
sort it at all!

> The sort code ---
>
> if ($orderby == 'month_num'):
> $sql = "select * from releases order by 'month'";
> elseif ($orderby == 'month_num2'):
> $sql = "select * from releases order by 'month' desc";

Try this:

$sql = "select * from releases order by month";



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




[PHP-DB] POSTGRESQL & PHP

2002-09-09 Thread Tomator

I've installed MySQL and PostgreSQL on my XP. I'd like to make an PHP script
working with pgsql base. I created database (typed "createdb name") but when
trying execute script with "pg_connect("host=localhost dbname=name"); it
fails.

Any suggestions?



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




Re: [PHP-DB] POSTGRESQL & PHP

2002-09-09 Thread Tomator

"Miles Thompson" wrote:
> 1. run a script containing phpinfo() function and confirm you have support
> for pgsql
> 2. add code to display the error message generated by either php or pgsql
> when you try to connnect
> 3. (Maybe this should have been first) I don't know about Windows systems,
> but on *nix, PostgreSQL has to be started with the -i switch to be
> accessible from the Internet. Check docs.
>
> Hope this helps - Miles Thompson

Yes, it does :)
First, I had to remove one little semicolon in php.ini (extensions) and
configure extensions.patch. After restart of Apache PHP began to display
some errors that finally guided me to succesfull pg_connect.

Thanks!



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