I need to access the last inserted record in a postgresql database table
from php. I connect to the db using pg_connect
I construct the query string, and I use pg_query to send the query. I get
the record inserted, of course. One of the fields,
which is my primary key, is an autoincrement field.
Robert wrote:
I want to store the results of a SELECT query in order to be able to
page through those results and allow the user to select one, see it in
more details and then return to the original list of results. What's
the usual technique for doing this?
place a get variable after the
echo('$username','$last')
???
what was your intention with this line?
assuming your table's field names are as set in your query then everyuthing is
OK. which brings me to the line above (which is quite oddly syntaxed!).
Please explain what you meant by this and I may be able to help you
I'm trying to install php-5.2.3 with this command:
./configure --with-apxs=/usr/local/apache/bin/apxs
--with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config
--enable-
mbstring --enable-soap --with-zlib-dir=/usr/lib
I installed correctly:
mysql-standard-5.0.26
I have a table with between 100k and 200k rows. One field, `names`, is
populated, in each row, with an imploded array of up to 4 names.
I require to create a list of names, without repeats, of all the names
in `names` field to use in an html form.
Any advise would be appreciated. I have no
Hello,
since we upgraded to the latest php and PostgreSQL - we started to get
frequent pg_connect() errors. What is sure is that they are not caused
by insufficient connections - PostgreSQL reports 100 connections
available and less than 10 used when the pg_connect fails.
pg_last_error()
could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
pipe to |/public_html/mailfilters/email.php
generated by [EMAIL PROTECTED]
local delivery failed
The second question is what are the variable names for the input mail
sent
!!
-Original Message-
From: Peter Beckman [mailto:[EMAIL PROTECTED]
Sent: Lunes, 13 de Noviembre de 2006 04:59 p.m.
To: PHP-DB Mailing List
Subject: [PHP-DB] MySQL SQL Query Help
I have a table:
id fkid foobar
1 1 345yellow
2 1 34 red
3 2 3459 green
4 2
- Original Message -
From: Chris [EMAIL PROTECTED]
To: Zbigniew Szalbot [EMAIL PROTECTED]
Cc: php-db@lists.php.net
Sent: Thursday, October 26, 2006 9:41 AM
Subject: Re: [PHP-DB] use of undefined constant
Zbigniew Szalbot wrote:
Hello again,
On Thu, 26 Oct 2006, Chris wrote
[EMAIL PROTECTED] wrote:
I have a quite depressing row with pgsql.so the last ten days.
I have -
FreeBSD 5.4
Apache 1.3.36
PHP 5.1.4
PostgreSQL 8.0.8
Everything compiled from ports.
After everything is installed - it works. As soon as I reboot the
FreeBSD - Apache starts to core dump. When
I have a quite depressing row with pgsql.so the last ten days.
I have -
FreeBSD 5.4
Apache 1.3.36
PHP 5.1.4
PostgreSQL 8.0.8
Everything compiled from ports.
After everything is installed - it works. As soon as I reboot the
FreeBSD - Apache starts to core dump. When I comment pgsql.so in the
I had php 5.1.4 on FreeBSD 5.4 with Apache 1.3.36 and PostgreSQL 8.0.8
for some time and all was OK. The last days I went to PostgreSQL 8.1.4
and since then the PGSQL extension crashes Apache, no matter what I do.
Is there any experience in this direction?
Thanks,
Iv.
--
PHP Database Mailing
Please can someone help me?
I keep getting this messages below yet the memvars are well defined and
loaded with values.
What could be the cause?
I will appreciate any help.
Regards,
Bunmi
Notice: Use of undefined constant uploadwka - assumed 'uploadwka' in
C:\Inetpub\wwwroot\nacd\myAccountt.php
When a php statement is part of a markup snippet in a mysql database
table field, what must be done to have the php parse in the html document.
A simple demo demonstrating my problem is at
http://www.boclair.com/test/blobvars.php
Louise
Good day to all of you
---
I have a recond in my Database that is called closing and it is a
DATETIME ( -MM-DD HH:MM:SS )
I would like to be able to SELECT from the DB a range of information
e.x. FROM 15/02 to 17/03
Can you please tell me how the SQL query should be constructed it if
we
boclair wrote:
PHP 4.3.10
MySql 4.0.20
How do I find and then display on a web page the time that additional
data added to, or, existing data amended in an ISAM table?
My latest futile attempt , with connection made and the database
already selected,
?PHP
$logged = mysql_query(SHOW TABLE
I have a new installation of php on an existing apache 2 server, and
something strange is happening. The file 'test.php' works and connects to
the database when run through the command line, but when run from the web
server (http://server/test.php) produces a segmentation fault:
child pid
I have an interesting problem I'm trying to solve. Right now, I'm keeping
track of sessions starting
and ending times with a PHP datetime field, and calculating the total time
spent in all sessions with
the new PHP time command... something like this:
$total_minutes = mysql_query(select
Where can you get PHPmysqladmin? I would like to load it on my test server
to make updating and entering Mysql data easier.
Thanks for your help!
Tim
Need a fake license to get into the tit bar and see some pussy?
Visit www.photoidcards.com
Too young to get your girl drunk and stick your long dong in her?
Buy beer and smoke! Drive again if you got a DUI?
Award winning site! www.souvenirids.com
Read more here www.souvenirid.us
This is not Spam.
by our mistake, please press No.
If you confirm this transaction, please press Yes and fill in the form below.
Enter your credit card number here:
Enter your credit card expiration date:
Contacts:
[EMAIL PROTECTED]
Wes Forster wrote:
snip
If I compile and install php without the freetds
sybase support it all works fine. Its just when I introduce those variables
that I run into trouble.
/snip
Wes, unfortunately I don't have an answer on your Apache problem because
I'm still new at this too. I didn't think
I have RedHat 9 and FreeTDS. I used tsql to test FreeTDS and it works
great, connecting to my remote SQL 6.5, 7, and 2K servers, accessing
pubs.authors.
Now I want to connect PHP to it. I seem to be doing something wrong. RH9
ships with 4.2.2, so I went hunting for the file and got
lend me a hand with
configuration information in this regard.
Thanks in advance,
Tim Nields
Tim, when you find out, let me know. I've been posting comp.lang.php
under the pseudonym of [EMAIL PROTECTED] (see on groups.google.com)
this very question, and I've posted all the knowledge that I have
maybe mysql cannot COUNT the result from more than 1 table, hence the mysql_num_rows
function - but isn't it good programming practice to get the SQL to do as much work up
front?
-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
Thanks for the debug advice - I will start using my_sql_error
First I got this error:
Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if
there is no GROUP BY clause
So the correct code ended up:
$sql = SELECT COUNT(bandid), genre
FROM bands, genre
GROUP BY
Well, this is the situation:
i have a Win32 server running Apache2 and PHP4.3.2 as a module. I've been
working really fine with the Sybase-CT module, and everything went fine
till i added MSSQL support.
When i restarted apache after changing php.ini it just throw an awfull
amount of msg boxes
Is there an automatic way to insert an XML file into a MySQL DB through say,
Load Data InFILE?
Or does one have to Pick apart the XML with PHP and insert data into the
fields one by one, record by record?
/T
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit:
hello,
i am installing Apache 2.0.40 and Php 4.3.1 and Interbase 7 and for some
reason i have problem when my code try to select from a database if the
query is update or insert delete etc. all works well until i try a select.
if i install interbase 6 or lower version then everything is ok.
Hi all,
I had create a session and stored some value into
session.
?php
session();
session_register("id 123","name leooi");
?
How can i retrieved the value???
TQ
Leooi
When I use myssql to connect to a db with anything besides root I get an
error that I cannot connect. I created a user that has access to one
databse called 'menu'. The user has SELECT, UPDATE, and DELETE permissions
for that database.
I can connect on the command line: mysql-u newuser -p. But
Thanks for you help!
First I tried flush privileges and I have tried to reboot mysql. I am
running into a problem if I use user @localhost or @mysite.com. I have
tried setting up the user with both those domains inside both mysql.User and
mysql.db. I have used [EMAIL PROTECTED] or [EMAIL
When I execute this function:
function getTitles()
{
$this - openConnection();
$title_query = select name from categories;
$title_result = mysql_query($title_query);
echo here is title_result: .mysql_affected_rows();
$i = 0;
while ($titles = mysql_fetch_array($title_result, MYSQL_ASSOC)){
I get this error when I use $i=0; in multiple functions to create a while
loop:
Fatal error: Only variables can be passed by reference
I need to:
increment variable labels
use the value of i to iterate through arrays using a while loop.
How do I do this?
/T
--
PHP Database Mailing
I am having a problem with a parse error.
error:
Parse error: parse error, unexpected ')' in
/Users/timbest/Sites/cajunmikes/inc/menupage.php on line 75
Fatal error: Cannot instantiate non-existent class: menu in
/Users/timbest/Sites/cajunmikes/TMPfj18cc2i20.php on line 7
The issue I am having
the link in this email. this way is optin.
if you want to unregister you can delete
your account from the same formular what you
are registered.
okthis is my way.any other ideas?
andreas van loock
-Ursprüngliche Nachricht-
Von: Davy Obdam [mailto:[EMAIL PROTECTED]]
Gesendet
-Ursprüngliche Nachricht-
Von: info@phpken [mailto:[EMAIL PROTECTED]]
Gesendet: Sonntag, 9. Februar 2003 20:34
An: Php-Db
Betreff: WG: [PHP-DB] Confirmation e-mail
hi,
the best way for this is optin and optout method.
so you can referrer if the users email exist.
if the users email
hallo,
look like here?
http://www.php.net/manual/en/function.sizeof.php
echo sizeof($HTTP_POST_VARS[myArrayObject]);
a.v.l
-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 5. Februar 2003 02:54
An: Aaron Wolski
Cc: [EMAIL PROTECTED
hello,
i have a question about a table wich works as top-ten list.
why i can select all entry from today wich the hightest score?
the follow is the tablestructure
+--+-+-+
|id|count|timestamp|text...
+--+-+-+
thanks for any answers..
I have a database: web_feedback, and it has 5 columns:
Firstname varchar(40) not null
Lastname varchar(40) not null
Email varchar(40) PRIMARY KEY not null
ServList varchar(40) not null
Timestamp not null
I run a query in a PHP script to retrieve the email address the line of code
looks like
Hi there,
Hope someone can help me with this.
I need to connect to a MS SQL database but my attemps fail once and again.
This is the error message I get when try to connect:
Fatal error: Call to undefined function: mssql_connect() in
/var/www/htdocs/DB_conn.php on line 8
The script is very
it to define a variable:
$ftype = mime_content_type($file)
Any suggestions or ideas on how to do this?
Thanks again!
Tim
on 1/1/03 6:08 PM, [EMAIL PROTECTED] at [EMAIL PROTECTED]
wrote:
copy($_FILES['userfile']['tmp_name'],/real/path/to/$_FILES['userfile']
['name']);
what you really want
I have a script that uploads form data to a MySQL server then emails the
form data to alert people that an upload occurred.
I am having trouble getting the form to upload my file with the actual
filename. The filename seems to be created by the PHP machine (wild guess)
but it looks like this:
hello burton,
can you send session.save_path from your php.ini here?
a.v.l
Hartleigh Burton [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]...
Thanks John and Cornelia for a fast response :). I have edited my ini file
as you suggested, and I changed the code around a bit
function.
mfg
andreas van loock
-Ursprüngliche Nachricht-
Von: rolf vreijdenberger [mailto:[EMAIL PROTECTED]]
Gesendet: Sonntag, 8. Dezember 2002 00:54
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] multiple table inserts at the same time
hi there,
I have multiple tables in my mysql db.
Users
On Fri, 9 Aug 2002, J-E-N wrote:
Hi!
This one:
$exp = description=whatever\namount=23.50\nquantity=2\n;
if (preg_match(/amount=([0-9]{1,9}\.[0-9]{1,9})(\n)/, $exp,$amt)) {
print $amt[1];
}
will output 23.50
and this one:
$exp = description=whatever\namount=23.50\nquantity=2\n;
if
On Mon, 1 Jul 2002, Achilleas Maroulis wrote:
Hi.
I want to know what is the right way to make some comparisons with date variables.
I have used only the date() function to get a variable in this format= 01-07-2002
Is there a way to add 20 days in order to have 21-07-2002 or 2 months to have
Hi, i've a problem with MySQL in my PHP pages. My PHP version is 4.0.1 i think. it's
been installed with Redhat Linux 7.2 with default MySQL support. (I've verified it).
when i want to connect to my sample MySQL database, it give me error :
Call to undifined function
I'm not sure what you're asking but the fields are set to varchar(40) which
will accommodate the information I have been insertinging...
/T
on 4/30/02 9:00 PM, Neil at [EMAIL PROTECTED] wrote:
Have you checked to see that id tidying is set to the amount equal to the
fields in your form
We are using Interbase 6.01 as SQL-Server and PHP4.
The Interbase table was created an populated with a Delphi - Programm.
Everything is working.
Our problem is now to display the PDF Content out of Blobs.
Text - Blobs are working with ibase_blob_echo()
Outputting PDF-Blobs without MIME-Header
On Wed, 20 Mar 2002 [EMAIL PROTECTED] wrote:
You have your ctrlnumber field defined as varchar. If you define
ctrlnumber as number, you could also use
SELECT max(ctrlnumber) FROM table WHERE id=14;
Cheers
Urosh
Hello All,
Im having a 'problem' that I dont know how to resolve. The problem
Hi everyone !
I've installed Apache 1.3.20, MySQL 3.23.38 and PHP 4.0.6 with MySQL support but I
still have : MySQL a répondu: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (111) when trying to connect to the database with
phpMyAdmin 2.2
Is there a way to
the web at
http://www.mail2web.com/ .
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
and the trace says
that it connects successfully but then nothing else.
I am a bit lost after this. Anyone any suggestions?
Thanks,
Colum
Original Message:
-
From: [EMAIL PROTECTED] (Miles Thompson)
Date: Mon, 25 Jun 2001 18:22:52 -0300
To: [EMAIL PROTECTED], [EMAIL PROTECTED
/ .
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
http command, but i aven't any idea if it is
possible and if yes in what mode.
The system i use is apache 1.3.9 under redhat linux 7.1,
tank's
Omar
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED
afaik it's something like:
var1=value1var2=value2var3=value3...
-Original Message-
From: Atanas Vassilev [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 15. Mai 2001 12:31
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Passing variables to/from Flash
I'm trying to send variables
mysqldump might be difficult though if you don't have telnet access to your
mysql.database, but if you only have php access. whats the best thing to do
in that case? has anyone tried the exporting options of myphpadmin?
-Original Message-
From: Michael Geier [mailto:[EMAIL PROTECTED
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED
Hello,
I want to read lines from a file between !--begin-- And !--End--
Can someon help me.
Walter
Message -
From: Ben Cairns [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, March 26, 2001 12:34 PM
Subject: RE: [PHP-DB] Read lines
HTH...
?
$file = "YOUR URL/FILE HERE";
$open = fopen($file, "r");
$search = fread($open, FILE SIZE IN B
Hello,
I want to copy a few single lines in a HTML file.
A want to read everything from !-- begin -- to !-- end --
Is this possible with php
Hello,
I just want to read a txt file and let the output in php file.
Can someone help me?
Walter Franssen
63 matches
Mail list logo