Re: [PHP-DB] php 5.2.9 and Postgres 8.3.7

2009-06-17 Thread danaketh
Do you have postgres module for PHP installed? This will probably be the cause. Didier Gasser-Morlay napsal(a): Hello, I tried all day yesterday to setup a brand new machine with a fresh Linux install; with apache 2.2.10 (from source) php 5.2.9 (from source) and PostgresQL 8.3.7 (from the ve

Re: [PHP-DB] oci8 1.3.4 working for months on my simple browser based php

2009-05-31 Thread danaketh
Look what extensions are you loading. You should find that in php.ini file. Maybe something nasty happened and you php.ini has extension=php_oracle.dll instead of extension=php_oracle.so. Also, if you are about to compile a module for PHP, first you have to run phpize, than ./configure and make

Re: [PHP-DB] php and mysql image script

2009-05-28 Thread danaketh
Look at www.phpclasses.org ;) Wilson Osemeilu napsal(a): I need a simple php mysql image upload script with display script too and to make this easier the mysql database table to use -- S pozdravem Daniel Tlach Freelance webdeveloper Email: m...@danaketh.com ICQ: 160914875 M

Re: [PHP-DB] pg_prepare()/pg_execute() and pg_query_params()

2009-05-26 Thread danaketh
Then you should put some debugging around the connection code. |$pgconn = pg_connect("host=localhost port=5432 dbname=test user=test password=test")| or die("Problem with connection to PostgreSQL: ".pg_last_error()); So you can be sure that you are really connected. Also you can use pg_resul

Re: [PHP-DB] pg_prepare()/pg_execute() and pg_query_params()

2009-05-26 Thread danaketh
Can you provide us with some of the queries you send to database? I'd suggest you test it with some easy and simple one, like this on from PHP documentation: |$result = pg_query_params($dbconn, 'SELECT * FROM shops WHERE name = $1', array("Joe's Widgets")); | Brandon Metcalf napsal(a): I'm f

Re: [PHP-DB] multi user php login script with user image upload

2009-05-24 Thread danaketh
I'd suggest using Google, but you can try phpclasses.org instead. There you'll find everything you need. Wilson Osemeilu napsal(a): I need multi user login php script which each user can upload their profile picture.. i mean the index.php register.php login.php changepassword.php etc

Re: [PHP-DB] Assigning the current value of a sequence to a variable - Postgres 8.3.6

2009-05-18 Thread danaketh
Hello, you're not fetching the query results. $query = "SELECT currval('\"tblPeople_peopleId_seq\"')"; $result = pg_query($query) or die("Can't execute 4th query"); if ($result != false) { $row = pg_fetch_row($result); echo "person id is " . $row[0] . ""; }

Re: [PHP-DB] Shopping cart

2009-05-16 Thread danaketh
Hi Vee, You have it all in that error :) You're calling function on non-object. Look into the basket.php. On the lines where you call the MySQL query you have $con->query($sql) but there is no decalaration of $con object anywhere before. I think you have an MySQL layer included (mysql.

Re: [PHP-DB] PHP & Postgres - query not writing to database.

2009-05-11 Thread danaketh
--+---+++ 404 | Ilka| | Ott| t | t 410 | Elinor | | Ostrom | t | t 374 | Gregory | | O'Hare | t | t 33 | Terry | J.| Ord| t | t (4 rows) On May 10, 2009, at 4:41 AM, danaketh wrote: I&

Re: [PHP-DB] PHP & Postgres - query not writing to database.

2009-05-10 Thread danaketh
I'd suggest you to copy the echoed queries and run them directly in terminal (if you have access). Also if you have remote access to the database and can use tools like pgAdmin or Navicat, that could help you with testing. Or send me the table structure and I'll try them myself ;) Carol Walter

Re: [PHP-DB] PostgreSQL query many escape characters?

2009-05-01 Thread danaketh
Hi, you should post the INSERT query too. I'd recommend you to print the query before running it. Just put echo $query; before/after pg_query(). You'll see what are you sending to the database. This may help you find the problem. Also using ` instead of " in query may help you to make it e

Re: [PHP-DB] Not getting option value from my database...

2009-04-17 Thread danaketh
Can't say for sure where the problem is but seems to me that you're using global variables instead of $_GET and $_POST. After sending the form, you should access it's content using $_POST... if (isset($_POST['get_name'])){ echo "People Id = ".$_POST['GetName'].""; } This should solve th

Re: [PHP-DB] Re: session variable in select query showing picture from database

2009-02-12 Thread danaketh
Don't see session_start() in your script. If you work with SESSION, you must have it on the first lines of the file (before any output and work with $_SESSION so it's good to put it on the first lines). And it must be in every file which works with them (except for included files). It should l

Re: [PHP-DB] Re: Problems with INNER JOIN

2009-01-29 Thread danaketh
Try that query in console or use Navicat/phpMyAdmin to run it. Remove the HAVING part to see if the SELECT returns what you need. Terion Miller napsal(a): Thanks Martin, oddly enough that still doesn't pull any results, it won't even print the variables if I try to list them to see, I know my d

Re: [PHP-DB] Problems with INNER JOIN

2009-01-29 Thread danaketh
Maybe LEFT instead of INNER? Terion Miller napsal(a): Hi Everyone! I am having problems getting an INNER JOIN to work and need some tips trouble shooting where the problem may be. What I'm trying to do is match up AdminID's from two tables and display only that users orders, sounds simple enoug

Re: [PHP-DB] re:database tables relations advice

2008-11-27 Thread danaketh
This is solved by using FOREIGN KEY but I'm not sure if MySQL have them present or just planned for some future release. mrfroasty napsal(a): I am quite new to database designs, I have a problem in my design...I can actually feel it, but I am not quite sure if there is a feature in mysql or I h

Re: [PHP-DB] Universal Update / Delete Script

2008-11-21 Thread danaketh
Well, if you're using some good database layer, you can have for example insert.php file with query template and give it some parameters. $arr = array( 'field1' => 'value1', 'field2' => 'valuer2', ... ); $query = layer::query('INSERT INTO [table]', $arr); Then you will need just to pr

Re: [PHP-DB] Could not run query

2008-09-28 Thread danaketh
Well, seems to me like a problem with quotes you're using in query... The ` quotes you're using doesn't work, when I tried to use them in PHP called query. Maybe you should try use single quotes and if they works. boclair napsal(a): I need help to track down the cause of the error,"Could not r

Re: [PHP-DB] Performance (lots of tables / databases...)

2008-09-27 Thread danaketh
Hi, the first choice is probably the best for you. When you think about second solution, it will be a nightmare when you have 1000+ databases and have to administrate them from one central system (if you're about to do it like this). The third solution looks little complicated to me - have