[PHP] Re: php to store data

2011-05-03 Thread Florin Jurcovici
Hi. Create a page containing just: open it in a browser, then see if SQLite appears in the resulting web page. If yes, you're done - you can use an actual database, although an embedded one. But this should also mean that you have file write access from PHP - since SQLite creates databases in f

[PHP] Re: postgresql database access failure

2011-05-02 Thread Florin Jurcovici
Hi.                $db = pg_connect('dbname=webcuttings user=httpd'); >                $query = 'SELECT * FROM articles'; >                $value=pg_fetch_result($query); >                echo 'all files' $value; >        ?> Maybe a password is set on your database for the user httpd? You have

[PHP] Re: combining PHP with JS

2011-04-20 Thread Florin Jurcovici
You can't combine PHP and JS this way. PHP is executed entirely on the server, before Javascript is even parsed. From Javascript you need to set something, for instance a special value into an http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Somewhat OT - Stored Procedures

2011-03-05 Thread Florin Jurcovici
Hi. I would always recommend stored procedures, as long as there are a very few rules obeyed: - keep them simple - they should mostly implement just CRUD operations plus application-specific searches, and should not encapsulate any other logic - use just portable SQL (well, as long as this is poss

[PHP] Re: something about dates in mysql

2011-03-04 Thread Florin Jurcovici
Why don't you use mysqli or PDO, when passing dates as parameters? If it's just about the right SQL, you _should_ actually use dates as strings - this is how mysql is able to handle them properly. However, you absolutely need to use a format of '-mm-dd', or else MySQL may fail on interpreting

[PHP] Re: Large binary objects in MySQL

2011-02-23 Thread Florin Jurcovici
Hi. > Wrong catch? [1] > > Regards, > Tommy No, it wasn't. If you look at where I pass in parameters, I have a $parameter-> value bound as value of the parameter, which is wrong. It should be just $parameter. I corrected my code (after digging for the larger part of a week), and now it's working.

[PHP] Problems with PDO and LOB columns in mysql

2011-02-22 Thread Florin Jurcovici
Hi. The code I use to extract the data from a query which was just performed looks like this: $data = array(); $receiverRow = array(); $i = 0; foreach ($columns as $column => $type) $statement->bindColumn($i++

[PHP] Large binary objects in MySQL - problem

2011-02-22 Thread Florin Jurcovici
Hi. I use PDO and have written myself a class to abstract the database a bit. It has a method for querying the database specifically for large objects, like this: $connection = $this->getConnection(); // what's returned is a PDOStatement, and a transaction is already started

[PHP] Accessing multi-word properties

2011-02-20 Thread Florin Jurcovici
Hi. I have a JSON, let's say "{\"a b\": 13}". json_decode() handles it properly. However, then resulting object has a property composed of two words. What I did to access this property was the following: $json = "{\"a b\": 13}"; $decoded = json_decode($json); $tag = "a b"; print($decoded->$tag)

[PHP] Re: PHP arguments getting lost in call!?

2011-02-15 Thread Florin Jurcovici
Hi. > I had no idea you were using Xdebug. When you said Zend Studio i assumed > you were using the standard Zend debugger. My bad. > > Been trying to get Xdebug working in combination with Zend Studio 8. The > two seem to talk to each other. But Zend Studio doesn't display any > data, no breakpoi

[PHP] Re: php-general Digest 14 Feb 2011 03:32:02 -0000 Issue 7180

2011-02-13 Thread Florin Jurcovici
Hi. >> Me stupid, my bad. >> >> Turns out the bug isn't in my code, but in the debugger. I'm working >> with the trial version of Zend Studio. When inside the call to the >> static method, everything is undefined. If I look at variables using >> the Expressions view, I can see their values, and th

Re: [PHP] PHP arguments getting lost in call!?

2011-02-13 Thread Florin Jurcovici
mewhat off topic: wow, that was a fast response! I challenge any commercial support service to have such response times - on Sunday! On Sun, Feb 13, 2011 at 10:53 AM, Richard Quadling wrote: > On 13 February 2011 08:36, Florin Jurcovici > wrote: >> Hi. >> >> The entry point

[PHP] PHP arguments getting lost in call!?

2011-02-13 Thread Florin Jurcovici
Hi. The entry point in my php app is a file containing something like: require_once("Disptacher.php"); ... Dispatcher:dispatch($arguments); ... The file Dispatcher.php is located in the same folder as the file containing the above code, and contains the following: class Dispatcher {

[PHP] String length output in php-generated response

2011-02-06 Thread Florin Jurcovici
Hi. I'm trying to build myself a small JSON-RPC server using PHP. Using wireshark, here's the conversation: Request: POST /.../service.php?nocache=1297004648751 HTTP/1.1 User-Agent: Opera/9.80 (X11; Linux i686; U; en) Presto/2.7.62 Version/11.01 Host: localhost A