[PHP-DB] Optimizing Query

2007-07-24 Thread Arie Nugraha

Hi list,

I Have a problem with my query that fetch about 22.000 records from
database, the query is like this :

SELECT SQL_CALC_FOUND_ROWS DISTINCT b.biblio_id, b.title,
a.author_name FROMbiblio AS b LEFT
JOIN biblio_author AS ba ON b.biblio_id=ba.biblio_id LEFT JOIN mst_author AS
a ON ba.author_id=a.author_id WHERE b.biblio_id IS NOT NULL GROUP BY
b.biblio_id ORDER BY b.input_date DESC LIMIT 0, 10

it took about 6 seconds to complete the query in localhost. I already make
an Indexes on each table, but still the performance is slow.
Anyone have an idea how to optimize the query so result is faster?

Thx


[PHP-DB] Cant connect to postgresql 7.4 on FreeBSD

2006-06-09 Thread Arie Nugraha

Hi list,

yesterday i compile postgresql 7.4 in my FreeBSD 5.4 box.
I manage to run the server smoothly without any problem.
But then i try to connect with my php script with pg_connect function, and
it returns an error like this :

*cant make link. to many connection open*

i already install the pgsql.so extension and its already loaded to php
without any problem (i saw it with phpinfo()).

I also have enable tcp/ip connection in postgresql.conf

whats wrong with my postgresql??


Re: [PHP-DB] Search / Replace using PHP

2006-03-30 Thread Arie Nugraha
Try this link for PERL regex reference :
http://www.perl.com/doc/manual/html/pod/perlre.html

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



Re: [PHP-DB] Re: Search / Replace using PHP

2006-03-30 Thread Arie Nugraha
If you want to have more control on searching and replacing in PHP,
try Regular Exprssion. I myself prefer PERL compatible regular
expression, because is little bit more easy than its POSIX sibling.

try preg_match(), pref_replace() etc.

There is many tutorial about PERL Regex Syntax on the net

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



Re: [PHP-DB] [Regular expression] Format string to "DD/MM/YYYY hh:mm"

2006-03-30 Thread Arie Nugraha
try this :

$date = "30/12/1982 15:30"

if (preg_match("/\d{2}\/\d{2}\/\d{4}\s\d{2}:\d{2}/i",$date )) {
echo "Date is valid";
} else {
echo "Date NOT valid";
}

hope it will help you

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



[PHP-DB] Killing apache child thread on Windows

2006-03-29 Thread Arie Nugraha
Dear list,

I have php4 installed as an apache2 module on my Windows XP.
i have some scripts that i think consume big memory (im using OOP coding
style), i try using
apache_child_terminate() function to free some memory to OS, but
unfortunately
this function is only available on *NIX OS (i try it on Ubuntu). Is there
any way to free some memory resources in Windows Box??

Thanks


[PHP-DB] IGLOO Simple Application for making ISIS Database Online

2006-03-18 Thread Arie Nugraha
List

IGLOO is a simple application for making ISIS Database Online on the
web. For you who don't have heard about ISIS yet, ISIS is a
lightweight database created by UNESCO primarily for storing
Bibliographical data/Metadata. This make ISIS use by many Library for
storing catalogues data.

Naturely ISIS database is a Desktop or DOS based application, but
IGLOO make it possible tou publish the ISIS database on the web, Very
Thanks to PHP-Openisis library extension by Braulio J. Solano Rojas

IGLOO published under GPL Licenses and you can download it for free at
http://yha.pfwh.net/igloo/

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



Re: [PHP-DB] Getting PHP 5 w/mysqli to communicate with MySQL 5

2006-01-20 Thread Arie Nugraha
To solve compability problem with mysql library, try to save your mysql user
password with OLD_PASSWORD('some pass') function, not the ordinary
PASSWORD('some pass') function.

With this you can connect to MySQL 4.1 > 5 even with php 4


Re: [PHP-DB] MYSQL IN A PHP LOOP

2005-11-10 Thread Arie Nugraha
Multiple query can only be done in PHP 5 with MySQLI extension.

In PHP 4 maybe you can use an array to store the query and execute each
query with foreach :




[PHP-DB] Re: Need help with delete and modify functions on a form.

2005-10-18 Thread Arie Nugraha
Checkbox form element is easy to applied in php

if you have a script like this :


 Some Value


Then to get the value of checkbox you can do this :



You can also use an array :


 Some Value 1
 Some Value 2
 Some Value 3


to get the the third value from the form you can do like this :



Hope that will help

On 10/17/05, Juan Stiller <[EMAIL PROTECTED]> wrote:
>
>  --- Bastien Koert <[EMAIL PROTECTED]> escribió:
>
> > something like this example
> > (http://www.weberdev.com/get_example-4085.html)?
> >
> > Bastien
> >
>
> Thanks Bastien, that would do the job, ill study it to
> adapt it to my needs.
>
> Another thing, i have some flash buttons, (im ussing
> dreamweaver), so once the records are displayed, user
> can filter the info lets say choosing the lastname
> filed, as its a precompiled button i only can specify
> a link.
>
> I saw once that with php you can specify pure code on
> the link funcion is there any chance to specify in the
> link section the filter code? like:
>
> SELECT * from mydatabase where lastname = 'john'???
>
> i think it was a way but i can´t find it now??
>
> Also, do you have any experience with checkbox on a
> form, i mean some tut??
>
> Thanks.
>
> Juan.
>
>
>   
>
>
>   
>   
> ___
> 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 Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Using MySQL Inno DB transaction

2005-07-12 Thread Arie Nugraha
Lately i'm building a library automation application with php 5 and MySQL 4..1.

For the transaction module, i'm using Inno DB engine to store the
transaction data, cos i want to use MySQL transaction method which can
be commit or rollback.

But when i tried to rollback the transaction in the other script, the
data still exist in the database.

script1.php :
autocommit(false);
// do the transaction
// and process it in script2.php
?>


script2.php
rollback();
?>

What's wrong?? does anybody could help me?? Thanks

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



[PHP-DB] MySQL 4.X Client Library

2005-03-22 Thread Arie Nugraha
I'm currently using MySQL 4  and php 4.3.10 right now
but as you may already know that, mysql 4.X has new Client Library(it
comes with new PASSWORD encryption method) and it is bundled with php
and mysql itself.

the problem is i cannot use that latest MySQL client Library, php
still using the 3.23.X Client library version.

Is there anyway that i can install the new MySQL Client Library on my php box.

Thanks

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



[PHP-DB] where can i get "fixed" mssql extension??

2005-03-19 Thread Arie Nugraha
Does Anyone know where can i get the latest and already fixed mssql extensions??

thank you

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