Hi there, recently I have created stored procedure in **Postgres Sql** which deals about with hashing passwords. When used via **pgAdmin** tool it works like a charm as stated below. SELECT horeca_user.update_token( 1, //user_id 1, //type 'sdsfsdfs' //token ) I have also installed extension **pgcrypto**. It works when called via **pgadmin** tool, but not inside **laravel** app as stated below my php code. $token=\DB::select("SELECT * from \"horeca_user\".update_token('$type', '$user_id', '$token')"); and finally this is my procedure code. CREATE OR REPLACE FUNCTION horeca_user.update_token(tp integer,userid integer,token character varying) RETURNS character varying LANGUAGE 'plpgsql' VOLATILE PARALLEL UNSAFE COST 100 AS $BODY$ DECLARE uid INTEGER; …

Member Avatar
+0 forum 0

I am converting a PHP application from MySQL to PostgresSQL. The MySQL works flawlessly. The database for this application is a one to many relationship. I have a while loop nested inside another while loop <?php while ($movie_row = pg_fetch_array($movie, PGSQL_ASSOC)) { ?> [html code to echo various elements of $movie_row] [a record in this part will have multiple records of information from another table in the db which the following code will fetch and process] <?php $movie_file_result = pg_query ($conn, "SELECT DISTINCT(cd_name) FROM movie_files WHERE data_id=".$movie_row[id]." ORDER BY cd_name");?> <div class="files"> <p>Find in:</p> <ul class="file_list"> <?php while ($filesrow = …

Member Avatar
Member Avatar
+0 forum 3

SELECT getdatabaseencoding(), current_setting('client_encoding'), current_setting('lc_ctype'), current_setting('lc_collate'), version(); returns UTF8 UNICODE C C PostgreSQL 9.1.7 on x86_64-unknown-linux-gnu, compiled by gcc-4.5.real (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2, 64-bit select lower('ČĘĖĮ') returns ČĘĖĮ Actually what I want is to seach surnames with ILIKE which is not working for those chars. WHy this can be?

Member Avatar
Member Avatar
+0 forum 12

Hi Thgin i seek is to create a connection (android) to the latest postgresql 9.2 database. Theat is running on a distant server. Can i Do it? Is postgre 9.2 JDBC driver fro andoid out? & little bit distant question. If the prevous is doable. How i an write tet (juint ect) for database code testing? If the postgresql 9.2 and adroid is imposssible. Can you maybe suggest a another alternative? For ecaple some public sql solutions. Im familiar with mysql, postgresql and access SQL :O. Thank you in advance!

Member Avatar
Member Avatar
+0 forum 3

Hello there! I've been trying to import data from csv file to remote postgre database with no luck. Locally i can do it with simple COPY query, but that only works because i'm superuser. \COPY command also works when i run it in psql. So the question is: how can i do it in PHP? Is there function that runs psql commands? Query example: COPY table1(field1, field2, field3) FROM '/filepath/data.csv' WITH DELIMITER ';' CSV HEADER; \copy table1(field1, field2, field3) FROM '/filepath/data.csv' WITH DELIMITER ';' CSV HEADER

Member Avatar
Member Avatar
+0 forum 3

The End.