Re: [PHP-DB] postgresql field size information

2004-05-27 Thread Cornelia Boenigk
Hi Try select attname, format_type(atttypid, atttypmod), col_description(attrelid, attnum) from pg_attribute, pg_class c where c.oid = attrelid and attnum 0 and c.relname = 'tablename' ; Regards Conni -- Datenbanklösungen + PostgreSQL + Webdesign http://www.cornelia-boenigk.de |

Re: [PHP-DB] First letter

2004-04-27 Thread Cornelia Boenigk
Hi Matt You can teat a string like an Array $first = $string[0]; $second = $string[1] and so on. Regards Conni -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] variable conversion

2003-01-31 Thread Cornelia Boenigk
Hi Use ?php echo $HTTP_POST_VARS(fname); ? instead, or in newer PHP versions ?php echo $_POST(fname); ? Regards Conni -- Datenbanklösungen + PostgreSQL + Webdesign http://www.cornelia-boenigk.de | http://www.pgsql.info http://www.dpunkt.de/buch/3-89864-175-9.html -- PHP Database Mailing List

Re: [PHP-DB] phppgAdmin connection prodblem

2002-12-16 Thread Cornelia Boenigk
Hi Yesterday I tried out phppgadmin. I didn't chage anything in the pg_hba.conf but only edited the config.inc.php.dist file in the phppgadmin distribution and saved it as config.inc.php. These are the lines I changed: $cfgSuperUser = superuser_name; $cfgServers[1]['host'] = 'localhost';

[PHP-DB] Get error message, need help

2002-12-16 Thread Cornelia Boenigk
Hi David // Query Database with username and encrypted password #$myquery = SELECT * FROM user WHERE username = ' . $user #$myquery = .' AND password = ' . crypt($password, xpz8ty) . '; #$result = mysql_query($myquery); In the first line of the query there is no semicolon at the end of

Re: [PHP-DB] Storing picture into DB

2002-11-20 Thread Cornelia Boenigk
Hi I do not have any experience with Sybase;-( If there is a field type available to store strings of unlimited length (or at least strings of your desired 60K) you could use the PHP functions base64_encode() to encode your image data and then store it as string in your table. If you retrieve it

Re: [PHP-DB] Form Error Checking ?

2002-08-27 Thread Cornelia Boenigk
Hi Dave This is working for me if (!empty($HTTP_POST_FILES['updatei']['tmp_name']) AND ($HTTP_POST_FILES['updatei']['tmp_name'] != none)) { $name = $HTTP_POST_FILES['updatei']['name']; $typ = $HTTP_POST_FILES['updatei']['type']; $size = $HTTP_POST_FILES['updatei']['size']; $tmpname =

Re: [PHP-DB] connectivity problem

2002-08-27 Thread Cornelia Boenigk
Hi Brian $sql_result=pg_exec($conn.$sql) or die (Couldn't Execute Query.); should be $sql_result=pg_exec($conn,$sql) or die (Couldn't Execute Query.); pg_exec($conn *comma not period* $sql)... Regards Conni -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] Error is SQL(works in phpMyAdmin)

2002-07-27 Thread Cornelia Boenigk
Hi You have an error in your SQL syntax near '; ^ As far as I know MySQL doesn't require a trailing *;* at the end of the query. Regards Conni -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] select from two tables

2002-07-27 Thread Cornelia Boenigk
Hi Barry $query = SELECT * FROM xoops_album,xoops_artist WHERE xoops_album.artist_id = xoops_artist.artist_id; If you only need two fields, it is not necessary to retrieve all fields $query = SELECT xoops_album.album, xoops_artist.artist FROM xoops_album, xoops_artist WHERE

Re: [PHP-DB] Pulling a data from array of checkboxes

2002-07-27 Thread Cornelia Boenigk
Hi In a new page how can I pull the data from a MySQL database according to each value I passed from a previous page? Not tested, just an idea;-) For example $chk[0] contains 12345, the value of checkbox1 $chk[1] contains 67890, the value of checkbox2 and so on. ?php foreach($chk as $key =

Re: [PHP-DB] Struggling with PG SQL and Large Objects

2002-07-25 Thread Cornelia Boenigk
Hi Eric Do you have any examples of uploading via post Yes and downloading via visiting a download page for this? No, sorry. The Upload is not difficult. There is an example in the PHP manual at php.net. The more interesting question is which datatype you want to use for the uploaded

Re: [PHP-DB] Struggling with PG SQL and Large Objects

2002-07-24 Thread Cornelia Boenigk
Hi Eric I currently can upload the file using pg_lo_import. I get back my OID which I store in a separate table I think this is the point. PostgreSQL doesn't store the uploaded file physically in the table but only the OID which is a reference to the file which is stored in a system catalogue.

Re: [PHP-DB] Struggling with PG SQL and Large Objects

2002-07-24 Thread Cornelia Boenigk
Hi Eric It was my understanding (from a friend) that I could actually store the files in the database and thereby eliminate me having to setup permissions If you use the large-objects-interface then the files go somewhere else and the references (OIDs) are stored in the tables. Another way

Re: [PHP-DB] lost link to pgsql thru PHP pages

2001-07-15 Thread Cornelia Boenigk
Hi Albert Hi, i have tried in any mode to pass the link from 1st page where i make the connect and the second where the connect is lost. Not the connection is lost but the variable $link. You use pg_pconnect which establishes a persistent connection. This connection is not automatically

Re: [PHP-DB] Help with Apache+PHP4 on Windows ME

2001-04-20 Thread Cornelia Boenigk
Hi Brian it asked if I wanted to "Open or Save the file from the Current Location" instead of parsing it. It seems, that the Browser has a poroblem with the mime-type. Check wheather the default mime-type is set to text/html. Hop it helps Conni -- PHP Database Mailing List