Re: [PHP-DB] Run php script on windows

2009-06-08 Thread kranthi
the error PHP Fatal error: Call to undefined function mysql_connect() says mysql extension is not enabled. enable mysql extension in your php.ini file for a beginner i strongly recomend http://www.apachefriends.org/en/xampp-windows.html -- PHP Database Mailing List (http://www.php.net/) To uns

Re: [PHP-DB] More than 50 entries!!!

2009-07-10 Thread kranthi
assign every product an unique product id. this can be done by an auto increment value in the primary table, then use mysql_insert_id() to get the product id. thereafter use the unique product id to refer to the product (in the database tables) -- PHP Database Mailing List (http://www.php.net/) T

Re: [PHP-DB] More than 50 entries!!!

2009-07-10 Thread kranthi
because 2,3,4 tables have one to many corespondence. (at least 4 table does)

Re: [PHP-DB] Single Quotes in Form Inputs

2009-07-27 Thread kranthi
I prefer PHP Data Objects http://in3.php.net/manual/en/book.pdo.php to addslashes and mysql_real_escape_string -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Code optimization

2009-08-06 Thread kranthi
xdebug to find the bottlenecks in your application. Kranthi. On Fri, Aug 7, 2009 at 06:00, Chris wrote: > Ron Piggott wrote: >> >> Is there a way to optimize this with better mySQL query? > > Step 1 - work out which bit is slow. > > $start_time = time(); > mysql_qu

Re: [PHP-DB] Code optimization

2009-08-07 Thread kranthi
>> You're assuming that. It could be the queries being run are the costliest. It has got nothing to do with the cost of query. bare mysql_connect() is very costly. compare \n"; $time = microtime(true); mysql_connect('localhost', 'user', 'pass'); mysql_close(); echo (microtime(true) - $time); wit

Re: [PHP-DB] GROUP BY

2009-08-17 Thread kranthi
ASC after GROUP BY ?? didn't mysql throw an error ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] PgSql PDO

2009-09-11 Thread kranthi
I am not able to get this working... 1. pdo_pgsql.so exists in the extensions directory and is referenced in the ini file. 2. phpinfo() shows that support for both pgsql and pdo_pgsql is enabled. 3. PDO::getAvailableDrivers() lists pgsql as avilable driver. 4. I am able to connect via pgsql_connect

Re: [PHP-DB] PgSql PDO

2009-09-12 Thread kranthi
> Try > "pgsql:" > This is case sensitive ;) > ( I'm messing around at the same level with the firsbird driver :) ) Yeh it worked. Thanks. But i remember seeing Pgsql somewhere in the docs... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] reading PDF file into a DB

2010-04-07 Thread kranthi
i always found http://www.ros.co.nz/pdf/ to be useful for these kind of applications -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Mysql completing Query fast but mysql->query() takes long time to return even single selects/updates

2010-04-11 Thread kranthi
just a pointer.. have you enabled php profiling to see if it actually mysql->query() that takes 20 secs ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Connecting to MySQL

2011-01-15 Thread Kranthi Krishna
note that you'll have to restart apache after any changes to httpd.conf/php.ini in your case httpd.conf was changed when u installed PDO Kranthi. http://goo.gl/e6t3 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Select from multiple tables

2012-02-29 Thread Kranthi Krishna
t, the number of selects increase as the number of one-to-many relationships increase. Is there a better way to do this ? I have to extend an existing code so I cannot use any libraries like doctrine Kranthi. http://goo.gl/e6t3 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP-DB] Select from multiple tables

2012-02-29 Thread Kranthi Krishna
similar (like php.net/array_search ) causes problems when Type 1 = Type 2 etc. Kranthi. http://goo.gl/e6t3 On 29 February 2012 19:43, Michael Stowe wrote: > Select table1.item1, table2.item1 from table1 inner join table2 on table1.key > = table2.foreignKey Where... > > You can

Re: [PHP-DB] Select from multiple tables

2012-02-29 Thread Kranthi Krishna
Hi, The examples I saw were regarding cartesian join not inner join. I will read about inner joins. Also, the example i mentioned seems to be a mistake. Both school and type will not be similar at the same time Kranthi. http://goo.gl/e6t3 On 1 March 2012 09:26, Kranthi Krishna wrote: >

Re: [PHP-DB] Select from multiple tables

2012-02-29 Thread Kranthi Krishna
arate NULL32 NULL NULLNULLNULL I can use php.net/is_null instead of php.net/array_search I dont think this problem is specific to me. Please suggest some best practices in this case. Kranthi. http://goo.gl/e6t3 On 1 March 2012 10:25, Karl DeSauln

Re: [PHP-DB] Select from multiple tables

2012-03-01 Thread Kranthi Krishna
ny relations Kranthi. http://goo.gl/e6t3 On 1 March 2012 21:47, Carl Michael Skog wrote: > -- Vidarebefordrat meddelande -- > Från: Carl Michael Skog > Datum: 1 mars 2012 17:12 > Ämne: Re: [PHP-DB] Select from multiple tables > Till: Kranthi Krishna > &