[PHP-DB] Bug in interbase.c (Ver. 5.2.6) INVALID BLOB ID

2008-11-27 Thread Benjamin Schwarze

Hi!

Ay many other users recognized, there is a bug in the implementation of 
the function _php_ibase_quad_to_string. (imho since version 5.2.1)


The line spprintf(result, BLOB_ID_LEN+1, 0x%0* LL_MASK x, 16, 
*(ISC_UINT64*)(void *) qd); doesnt work as estimated. The result 
stored inside qd isnt the value convertet from the string, but something 
else. Normally this should work, but it doesnt.


One possible solution is, to change the line into spprintf(result, 
BLOB_ID_LEN+1, 0x%0*x%0*x, 8, qd.gds_quad_low, 8, qd.gds_quad_high);


Of course, this solution isnt the fine way ... but it works.

The problem occured onto a 64bit System (Fedora Core 8).

Greetings
Benjamin

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] re:database tables relations advice

2008-11-27 Thread mrfroasty
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 have to solve it with programming.

Example:
CREATE TABLE A (
user_id int(16) NOT NULL auto_increment,
..other datas
PRIMARY KEY (user_id)
   );

CREATE TABLE B (
user_id int(16) NOT NULL auto_increment,
..other datas
PRIMARY KEY (contact_id)
);

Question:
How can I declare that the user_id in my 1st table is related to user_id
in the 2nd table...actually I prefer to have it exactly the same user_id
in both tablesI think if those 2 entries are the same it will be
great, but I am not sure how to achieve this.

P:S
-Ofcourse I know that I can extract it from TABLE A and save it in TABLE
Bbut is that a way to go???Because this issue arise in couple of
tables in my data structure that I am tending to use in my application(web).
-I also know that its possible to  make just 1 big table with lots of
columnsbut I read its not a good database design...

-please advice, running out of ideas :-(

Thanks..


-- 
Extra details:
OSS:Gentoo Linux-2.6.25-r8
profile:x86
Hardware:msi geforce 8600GT asus p5k-se
location:/home/muhsin
language(s):C/C++,VB,VHDL,bash
Typo:40WPM
url:http://mambo-tech.net


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 have to solve it with programming.

Example:
CREATE TABLE A (
user_id int(16) NOT NULL auto_increment,
..other datas
PRIMARY KEY (user_id)
   );

CREATE TABLE B (
user_id int(16) NOT NULL auto_increment,
..other datas
PRIMARY KEY (contact_id)
);

Question:
How can I declare that the user_id in my 1st table is related to user_id
in the 2nd table...actually I prefer to have it exactly the same user_id
in both tablesI think if those 2 entries are the same it will be
great, but I am not sure how to achieve this.

P:S
-Ofcourse I know that I can extract it from TABLE A and save it in TABLE
Bbut is that a way to go???Because this issue arise in couple of
tables in my data structure that I am tending to use in my application(web).
-I also know that its possible to  make just 1 big table with lots of
columnsbut I read its not a good database design...

-please advice, running out of ideas :-(

Thanks..


  


--

S pozdravem

Daniel Tlach
Freelance webdeveloper

Email: [EMAIL PROTECTED]
ICQ: 160914875
MSN: [EMAIL PROTECTED]
Jabber: [EMAIL PROTECTED]



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

2008-11-27 Thread mrfroasty
maruti wrote:
 hey lemme knoe, how many columns are you planning for?
 y not put table B columns in table A??
 if you are least bothered about data normalizations, simply go the way
 you want to.
 userId  Name Age Age  Sex Occupation Location
 all the data which has correspondence with userid can be put in a
 single table..
 the case is if you dont've many related tables..
 pavan puligandla
 Microsoft has no beef with OpenSource.


 2008/11/27 mrfroasty [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]

 maruti wrote:
  hii,,
  who said table with more no:of columns is a bad database design?
  coming to your tables,
  what do you wanna do??
  if you want to pull out the data of 'X' userid from table B,
 then you
  can use left join.
  make sure that user ID of table A and userID of table B have same
  data. to use joins, atleast one column(s) should be the same in both
  tables.
  let me know whether userID of table B is a foreign key of UserID of
  table A or not?
 
  normalization in all cases doesnt work.
  i'm using spreadsheet as my front end, so my tables are not even in
  the second normal form..
 
  here are some excellent tutorials for joins;
  http://www.tutorialspoint.com/mysql/mysql-using-joins.htm
 
 http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html
  hope these might help u alot..
 
 
  pavan puligandla
  Microsoft has no beef with OpenSource.
 
 
  2008/11/27 mrfroasty [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED]
 
  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 have to solve it with programming.
 
  Example:
  CREATE TABLE A (
 user_id int(16) NOT NULL auto_increment,
 ..other datas
 PRIMARY KEY (user_id)
);
 
  CREATE TABLE B (
 user_id int(16) NOT NULL auto_increment,
 ..other datas
 PRIMARY KEY (contact_id)
 );
 
  Question:
  How can I declare that the user_id in my 1st table is related to
  user_id
  in the 2nd table...actually I prefer to have it exactly the same
  user_id
  in both tablesI think if those 2 entries are the same it
 will be
  great, but I am not sure how to achieve this.
 
  P:S
  -Ofcourse I know that I can extract it from TABLE A and save
 it in
  TABLE
  Bbut is that a way to go???Because this issue arise in
 couple of
  tables in my data structure that I am tending to use in my
  application(web).
  -I also know that its possible to  make just 1 big table
 with lots of
  columnsbut I read its not a good database design...
 
  -please advice, running out of ideas :-(
 
  Thanks..
 
 
  --
  Extra details:
  OSS:Gentoo Linux-2.6.25-r8
  profile:x86
  Hardware:msi geforce 8600GT asus p5k-se
  location:/home/muhsin
  language(s):C/C++,VB,VHDL,bash
  Typo:40WPM
  url:http://mambo-tech.net
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 Quote:
 make sure that user ID of table A and userID of table B have same
 data.

 #That is actually what I am looking for, but I dunno how to achieve
 that.If I can have those 2 user_id columns with the same data, my
 problem is technically solved.But as I said earlier I am limited to
 database skills, its my first application that involves mysql 
 phpdo I need those foreign key stuffs, to have those 2 columns
 with
 the same data??

 --
 Extra details:
 OSS:Gentoo Linux-2.6.25-r8
 profile:x86
 Hardware:msi geforce 8600GT asus p5k-sehave
 location:/home/muhsin
 language(s):C/C++,VB,VHDL,bash
 Typo:40WPM
 url:http://mambo-tech.net



That issue arise like 3 times in my data structurehaving all related
data in one table I might ended up with a table of ~20 columns, it will
be too much and probably bad programming practise.I will have a look
over the net about FOREIGN KEYdidnt know what it is, may be its the
solution...

Thanks for the input



-- 
Extra details:
OSS:Gentoo Linux-2.6.25-r8
profile:x86
Hardware:msi geforce 8600GT asus p5k-se
location:/home/muhsin
language(s):C/C++,VB,VHDL,bash
Typo:40WPM
url:http://mambo-tech.net


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: 

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

2008-11-27 Thread mrfroasty
danaketh wrote:
 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 have to solve it with programming.

 Example:
 CREATE TABLE A (
 user_id int(16) NOT NULL auto_increment,
 ..other datas
 PRIMARY KEY (user_id)
);

 CREATE TABLE B (
 user_id int(16) NOT NULL auto_increment,
 ..other datas
 PRIMARY KEY (contact_id)
 );

 Question:
 How can I declare that the user_id in my 1st table is related to user_id
 in the 2nd table...actually I prefer to have it exactly the same user_id
 in both tablesI think if those 2 entries are the same it will be
 great, but I am not sure how to achieve this.

 P:S
 -Ofcourse I know that I can extract it from TABLE A and save it in TABLE
 Bbut is that a way to go???Because this issue arise in couple of
 tables in my data structure that I am tending to use in my application(web).
 -I also know that its possible to  make just 1 big table with lots of
 columnsbut I read its not a good database design...

 -please advice, running out of ideas :-(

 Thanks..


   

 -- 

 S pozdravem

 Daniel Tlach
 Freelance webdeveloper

 Email: [EMAIL PROTECTED]
 ICQ: 160914875
 MSN: [EMAIL PROTECTED]
 Jabber: [EMAIL PROTECTED]

Thanks for the input...after some small research I came across this link
http://articles.techrepublic.com.com/5100-10878_11-6035435.html
after that I changed my database to something similar to :

CREATE TABLE user_profile (
 user_id int(16) NOT NULL auto_increment,
   other datas
PRIMARY KEY (user_id)
   )ENGINE=INNODB;

CREATE TABLE user_contact (
user_id int(16) NOT NULL auto_increment,
..other datas
INDEX (user_id),
FOREIGN KEY (user_id) REFERENCES user_profile (user_id),
PRIMARY KEY (user_id)
) ENGINE=INNODB;

That I think problem solved for now...thanks alot :-)

-- 
Extra details:
OSS:Gentoo Linux-2.6.25-r8
profile:x86
Hardware:msi geforce 8600GT asus p5k-se
location:/home/muhsin
language(s):C/C++,VB,VHDL,bash
Typo:40WPM
url:http://mambo-tech.net


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] MySQLi not closing connections

2008-11-27 Thread Jonathan Langevin
I was thinking the same bug, except that I'm not using real_connect
(pass login params when initializing the class), and also the issue
only occurs when logging is enabled.

I'm really at a loss here :-\

--
Jonathan Langevin
PHP Site Solutions
http://www.phpsitesolutions.com



On Wed, Nov 26, 2008 at 2:50 PM, Fergus Gibson [EMAIL PROTECTED] wrote:
 On Wed, Nov 26, 2008 at 10:36 AM, Jonathan Langevin
 [EMAIL PROTECTED] wrote:
 I would normally think there were problems elsewhere in the code, if
 the issues didn't stop once I comment out the logging functionality.

 I don't see anything that would account for your symptoms in that code
 snippet, but it's important to remember that sometimes code in one
 place can interact with code in another place to expose a bug.  When
 your application uses ext/mysql, it uses only built-in functions.
 It's only when it uses ext/mysqli that it uses a customized sub-class.
  I would look in that subclass for the problem.

 But honestly, I'm flummoxed, Jon.  Since non-persistent connections
 should automatically close when the script ends (normally or for an
 error), I don't understand why the connections are remaining open only
 when logging is enabled.  I would expect it to be a by-product of the
 connection process instead or a bug.

 Does the application use mysql_real_connect() or mysqli_real_connect()
 at all?  If so, are you using a version of PHP pre-5.3?  There is a
 bug and a bug fix for it.

 http://bugs.mysql.com/bug.php?id=33831
 http://bugs.php.net/bug.php?id=39457


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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

2008-11-27 Thread Fortuno, Adam
Mr. Froasty,

From your note, it sounds like you want to use foreign keys; as Daniel
pointed out. I think an example would be helpful here. The subject of
foreign keys is bigger than a bread box so I'll just touch on the pieces
I think you'll find helpful. There is all sorts of literature scattered
about the web if you want to know more. Let's start with a fictional
case:

I work for a company with multiple departments each of which have one or
more employees. I would like a relational data structure to capture
departmental and employee information as well as preserve the
relationship between the two.

Make sense?

I create two tables: `Department` and `Employee`. Each table has a
primary key (as you illustrated in your example), which is unique per
record. importantI add a column in Employee that holds the primary key
of the employee's associated department/important. I then create a
relation between the two tables to indicate there is a relationship.

--Create the Department table
CREATE TABLE Department (
IDDepartment INT NOT NULL AUTO_INCREMENT, 
Name VARCHAR(35),
PRIMARY KEY (IDDepartment)
) ENGINE = InnoDB;

--Create the Employee table and simultaneously the 
--relation to Department
CREATE TABLE Employee (
IDEmployee INT NOT NULL AUTO_INCREMENT, 
idDepartment INT NOT NULL,
Name VARCHAR(35),
PRIMARY KEY (IDEmployee),
INDEX IDX_idDepartment (idDepartment),
FOREIGN KEY (idDepartment) REFERENCES Department(idDepartment) 
 ON DELETE CASCADE
 ON UPDATE CASCADE
) ENGINE = InnoDB;

MySQL can do all of this provided you're using the InnoDB storage
engine. MySQL's documentation has some helpful information on the
subject - see link below.

http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-foreign-keys.html

With me so far?

A few points specific to MySQL:

(1) Whatever field you chose as your foreign key, needs an index.
(2) You can add foreign keys after a table has been created using an
ALTER statement.
(3) The option ON DELETE CASCADE means that whenever the parent record
(i.e., the department) is deleted the related employees will be deleted
too.
(4) The option ON UPDATE CASCADE means that whenver the parent's key
record (i.e., the department) is updated the related foreign key record
will be updated too.
(5) There are options other than ON UPDATE and ON DELETE. Give'm a look.

Good luck, and welcome to the DB development club.

Cheers,
Adam

-Original Message-
From: mrfroasty [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 27, 2008 5:19 AM
To: php-db@lists.php.net
Subject: [PHP-DB] re:database tables relations advice

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 have to solve it with programming.

Example:
CREATE TABLE A (
user_id int(16) NOT NULL auto_increment,
..other datas
PRIMARY KEY (user_id)
   );

CREATE TABLE B (
user_id int(16) NOT NULL auto_increment,
..other datas
PRIMARY KEY (contact_id)
);

Question:
How can I declare that the user_id in my 1st table is related to user_id
in the 2nd table...actually I prefer to have it exactly the same user_id
in both tablesI think if those 2 entries are the same it will be
great, but I am not sure how to achieve this.

P:S
-Ofcourse I know that I can extract it from TABLE A and save it in TABLE
Bbut is that a way to go???Because this issue arise in couple of
tables in my data structure that I am tending to use in my
application(web).
-I also know that its possible to  make just 1 big table with lots of
columnsbut I read its not a good database design...

-please advice, running out of ideas :-(

Thanks..


-- 
Extra details:
OSS:Gentoo Linux-2.6.25-r8
profile:x86
Hardware:msi geforce 8600GT asus p5k-se
location:/home/muhsin
language(s):C/C++,VB,VHDL,bash
Typo:40WPM
url:http://mambo-tech.net


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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

2008-11-27 Thread Bastien Koert
On Thu, Nov 27, 2008 at 1:36 PM, Fortuno, Adam
[EMAIL PROTECTED]wrote:

 Mr. Froasty,

 From your note, it sounds like you want to use foreign keys; as Daniel
 pointed out. I think an example would be helpful here. The subject of
 foreign keys is bigger than a bread box so I'll just touch on the pieces
 I think you'll find helpful. There is all sorts of literature scattered
 about the web if you want to know more. Let's start with a fictional
 case:

 I work for a company with multiple departments each of which have one or
 more employees. I would like a relational data structure to capture
 departmental and employee information as well as preserve the
 relationship between the two.

 Make sense?

 I create two tables: `Department` and `Employee`. Each table has a
 primary key (as you illustrated in your example), which is unique per
 record. importantI add a column in Employee that holds the primary key
 of the employee's associated department/important. I then create a
 relation between the two tables to indicate there is a relationship.

 --Create the Department table
 CREATE TABLE Department (
IDDepartment INT NOT NULL AUTO_INCREMENT,
Name VARCHAR(35),
PRIMARY KEY (IDDepartment)
 ) ENGINE = InnoDB;

 --Create the Employee table and simultaneously the
 --relation to Department
 CREATE TABLE Employee (
IDEmployee INT NOT NULL AUTO_INCREMENT,
idDepartment INT NOT NULL,
Name VARCHAR(35),
PRIMARY KEY (IDEmployee),
INDEX IDX_idDepartment (idDepartment),
FOREIGN KEY (idDepartment) REFERENCES Department(idDepartment)
 ON DELETE CASCADE
 ON UPDATE CASCADE
 ) ENGINE = InnoDB;

 MySQL can do all of this provided you're using the InnoDB storage
 engine. MySQL's documentation has some helpful information on the
 subject - see link below.

 http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-foreign-keys.html

 With me so far?

 A few points specific to MySQL:

 (1) Whatever field you chose as your foreign key, needs an index.
 (2) You can add foreign keys after a table has been created using an
 ALTER statement.
 (3) The option ON DELETE CASCADE means that whenever the parent record
 (i.e., the department) is deleted the related employees will be deleted
 too.
 (4) The option ON UPDATE CASCADE means that whenver the parent's key
 record (i.e., the department) is updated the related foreign key record
 will be updated too.
 (5) There are options other than ON UPDATE and ON DELETE. Give'm a look.

 Good luck, and welcome to the DB development club.

 Cheers,
 Adam

 -Original Message-
 From: mrfroasty [mailto:[EMAIL PROTECTED]
 Sent: Thursday, November 27, 2008 5:19 AM
 To: php-db@lists.php.net
 Subject: [PHP-DB] re:database tables relations advice

 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 have to solve it with programming.

 Example:
 CREATE TABLE A (
user_id int(16) NOT NULL auto_increment,
..other datas
PRIMARY KEY (user_id)
   );

 CREATE TABLE B (
user_id int(16) NOT NULL auto_increment,
..other datas
PRIMARY KEY (contact_id)
);

 Question:
 How can I declare that the user_id in my 1st table is related to user_id
 in the 2nd table...actually I prefer to have it exactly the same user_id
 in both tablesI think if those 2 entries are the same it will be
 great, but I am not sure how to achieve this.

 P:S
 -Ofcourse I know that I can extract it from TABLE A and save it in TABLE
 Bbut is that a way to go???Because this issue arise in couple of
 tables in my data structure that I am tending to use in my
 application(web).
 -I also know that its possible to  make just 1 big table with lots of
 columnsbut I read its not a good database design...

 -please advice, running out of ideas :-(

 Thanks..


 --
 Extra details:
 OSS:Gentoo Linux-2.6.25-r8
 profile:x86
 Hardware:msi geforce 8600GT asus p5k-se
 location:/home/muhsin
 language(s):C/C++,VB,VHDL,bash
 Typo:40WPM
 url:http://mambo-tech.net


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php


A couple of quick notes to add here:

1. MySQL supports FKs when using the INNODB engine, so you will need to
change the engine type if the tables are anything else

2. It is possible to use the application to handle the keys instead of the
database, it involves more work around key checking / validation before
creating or updating records, but it can be done if the INNODB table type is
not accessible to you for some reason. Inserting / reading from the table
would be handled by an order precedence where you first select something
from something like the 

Re: [PHP-DB] Bug in interbase.c (Ver. 5.2.6) INVALID BLOB ID

2008-11-27 Thread Chris

Benjamin Schwarze wrote:

Hi!

Ay many other users recognized, there is a bug in the implementation of 
the function _php_ibase_quad_to_string. (imho since version 5.2.1)


The line spprintf(result, BLOB_ID_LEN+1, 0x%0* LL_MASK x, 16, 
*(ISC_UINT64*)(void *) qd); doesnt work as estimated. The result 
stored inside qd isnt the value convertet from the string, but something 
else. Normally this should work, but it doesnt.


One possible solution is, to change the line into spprintf(result, 
BLOB_ID_LEN+1, 0x%0*x%0*x, 8, qd.gds_quad_low, 8, qd.gds_quad_high);


Of course, this solution isnt the fine way ... but it works.


If you want to discuss this sort of stuff, join the -internals list. 
That's where they discuss the C code behind php.


--
Postgresql  php tutorials
http://www.designmagick.com/


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Value of $_POST['submit']

2008-11-27 Thread Ron Piggott
I am working on the following web page tonight:
http://www.actsministrieschristianevangelism.org/verseoftheday/

I am trying to program the Load Previous Issue Random Issue and
Load Next Issue buttons.

I am using Ajax to pass the date the user is requesting to the PHP
script for processing.  

I am wondering how my PHP script may access the value of value of
$_POST['submit'].  At present echo $_POST['submit']; doesn't give me a
value.  Consequently all queries to the mySQL database fail.

Ron


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Value of $_POST['submit']

2008-11-27 Thread Yves Sucaet

Hi Ron,

What's your Javascript client-side code to invoke the PHP-script? You may 
need to switch to $_GET[] instead of $_POST...


Yves

- Original Message - 
From: Ron Piggott [EMAIL PROTECTED]

To: PHP DB php-db@lists.php.net
Sent: Thursday, November 27, 2008 7:02 PM
Subject: [PHP-DB] Value of $_POST['submit']



I am working on the following web page tonight:
http://www.actsministrieschristianevangelism.org/verseoftheday/

I am trying to program the Load Previous Issue Random Issue and
Load Next Issue buttons.

I am using Ajax to pass the date the user is requesting to the PHP
script for processing.

I am wondering how my PHP script may access the value of value of
$_POST['submit'].  At present echo $_POST['submit']; doesn't give me a
value.  Consequently all queries to the mySQL database fail.

Ron


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Value of $_POST['submit']

2008-11-27 Thread Martin, Steve (MAN-Corporate)
When I'm developing a number of pages and don't keep track of every
variable or form name (etc), I plant a print_r($_POST); at the top of
the page, so there's no guessing what gets sent to the page . . . 

If you have an empty $_POST array, then the form isn't using
action=post, or you didn't code your button as type=submit (?)

Just suggestions - since I can't see the code.

Steve

- Original Message - 
From: Ron Piggott [EMAIL PROTECTED]
To: PHP DB php-db@lists.php.net
Sent: Thursday, November 27, 2008 7:02 PM
Subject: [PHP-DB] Value of $_POST['submit']


I am working on the following web page tonight:
 http://www.actsministrieschristianevangelism.org/verseoftheday/

 I am trying to program the Load Previous Issue Random Issue and
 Load Next Issue buttons.

 I am using Ajax to pass the date the user is requesting to the PHP
 script for processing.

 I am wondering how my PHP script may access the value of value of
 $_POST['submit'].  At present echo $_POST['submit']; doesn't give me a
 value.  Consequently all queries to the mySQL database fail.

 Ron


 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Value of $_POST['submit']

2008-11-27 Thread YVES SUCAET
Hi Steve, 

He's using Ajax, so some variant of the XMLHttpRequest Javascript object on
the client. It may not be obvious which method is used when the data is sent.

Now that I think of it, printing $_SERVER[REQUEST_METHOD] should let you know
which one is being used.

hth.

Yves

-- Original Message --
Received: Thu, 27 Nov 2008 08:48:08 PM CST
From: Martin, Steve \(MAN-Corporate\) [EMAIL PROTECTED]
To: Yves Sucaet [EMAIL PROTECTED],  php-db@lists.php.net
Subject: RE: [PHP-DB] Value of $_POST['submit']

When I'm developing a number of pages and don't keep track of every
variable or form name (etc), I plant a print_r($_POST); at the top of
the page, so there's no guessing what gets sent to the page . . . 

If you have an empty $_POST array, then the form isn't using
action=post, or you didn't code your button as type=submit (?)

Just suggestions - since I can't see the code.

Steve

- Original Message - 
From: Ron Piggott [EMAIL PROTECTED]
To: PHP DB php-db@lists.php.net
Sent: Thursday, November 27, 2008 7:02 PM
Subject: [PHP-DB] Value of $_POST['submit']


I am working on the following web page tonight:
 http://www.actsministrieschristianevangelism.org/verseoftheday/

 I am trying to program the Load Previous Issue Random Issue and
 Load Next Issue buttons.

 I am using Ajax to pass the date the user is requesting to the PHP
 script for processing.

 I am wondering how my PHP script may access the value of value of
 $_POST['submit'].  At present echo $_POST['submit']; doesn't give me a
 value.  Consequently all queries to the mySQL database fail.

 Ron


 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

 



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php






--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Bug in interbase.c (Ver. 5.2.6) INVALID BLOB ID

2008-11-27 Thread Benjamin Schwarze

Thank you for this hint.

Chris schrieb:

Benjamin Schwarze wrote:

Hi!

Ay many other users recognized, there is a bug in the implementation 
of the function _php_ibase_quad_to_string. (imho since version 5.2.1)


The line spprintf(result, BLOB_ID_LEN+1, 0x%0* LL_MASK x, 16, 
*(ISC_UINT64*)(void *) qd); doesnt work as estimated. The result 
stored inside qd isnt the value convertet from the string, but 
something else. Normally this should work, but it doesnt.


One possible solution is, to change the line into spprintf(result, 
BLOB_ID_LEN+1, 0x%0*x%0*x, 8, qd.gds_quad_low, 8, qd.gds_quad_high);


Of course, this solution isnt the fine way ... but it works.


If you want to discuss this sort of stuff, join the -internals list. 
That's where they discuss the C code behind php.




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-DB] Re: Help to create multiple referrals using php and mysql

2008-11-27 Thread Mohan L
Dear All,

I have one requirement to create multiple referral for my project .I
found some information from php-db archive .I follow the same to
design the database .here is the my data base information

This the query used to create table:
mysql create table customers ( cust_id int unsigned not null
auto_increment primary key, cust_name VARCHAR(25) default NULL );
Query OK, 0 rows affected (0.00 sec)

Then inserted  following values to the my table:
mysql insert into customers(cust_id,cust_name)values (1,'guru');
Query OK, 1 row affected (0.08 sec)

mysql insert into customers(cust_id,cust_name)values (2,'gopal');
Query OK, 1 row affected (0.01 sec)

mysql insert into customers(cust_id,cust_name)values (3,'sathish');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (4,'suresh');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (5,'uma');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (6,'ram');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (7,'raj');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (8,'kumar');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (9,'mohan');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (10,'ahmed');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (11,'ruba');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (12,'sai');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values(13,'mahul');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (14,'karthik');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (15,'kamaraj');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (16,'ravi');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (17,'prakash');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (18,'selvam');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (19,'raja');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (20,'ragu');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (21,'ramesh');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (22,'rajesh');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (23,'nandini');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (24,'raman');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (25,'somu');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (26,'mani');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (27,'murugan');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (28,'maran');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (29,'usha');
Query OK, 1 row affected (0.01 sec)

mysql insert into customers(cust_id,cust_name)values (30,'radha');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (31,'rathika');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (32,'vishnu');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (33,'mala');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (34,'malar');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (35,'magesh');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (36,'senthil');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (37,'arul');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (38,'lakshmi');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (39,'sarasvathi');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (40,'linus');
Query OK, 1 row affected (0.00 sec)

mysql

mysql select * from customers;
+-++
| cust_id | cust_name  |
+-++
|   1 | guru   |
|   2 | gopal  |
|   3 | sathish|
|   4 | suresh |
|   5 | uma|
|   6 | ram|
|   7 | raj|
|   8 | kumar  |
|   9 | mohan  |
|  10 | ahmed  |
|  11 | ruba

[PHP-DB] Fwd: Help to create multiple referrals using php and mysql

2008-11-27 Thread Mohan L
Dear All,
I am new to this mailing list and new to LAMP .please correct me any
thing wrong .And also tell me how to achive this effieient way with
less query ,and less expansive .

I have one requirement to create multiple referral for my project .I
found some information from php-db archive .I follow the same to
design the database .here is the my data base information

This the query used to create table:
mysql create table customers ( cust_id int unsigned not null
auto_increment primary key, cust_name VARCHAR(25) default NULL );
Query OK, 0 rows affected (0.00 sec)

Then inserted  following values to the my table:
mysql insert into customers(cust_id,cust_name)values (1,'guru');
Query OK, 1 row affected (0.08 sec)

mysql insert into customers(cust_id,cust_name)values (2,'gopal');
Query OK, 1 row affected (0.01 sec)

mysql insert into customers(cust_id,cust_name)values (3,'sathish');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (4,'suresh');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (5,'uma');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (6,'ram');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (7,'raj');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (8,'kumar');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (9,'mohan');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (10,'ahmed');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (11,'ruba');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (12,'sai');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values(13,'mahul');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (14,'karthik');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (15,'kamaraj');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (16,'ravi');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (17,'prakash');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (18,'selvam');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (19,'raja');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (20,'ragu');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (21,'ramesh');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (22,'rajesh');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (23,'nandini');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (24,'raman');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (25,'somu');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (26,'mani');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (27,'murugan');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (28,'maran');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (29,'usha');
Query OK, 1 row affected (0.01 sec)

mysql insert into customers(cust_id,cust_name)values (30,'radha');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (31,'rathika');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (32,'vishnu');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (33,'mala');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (34,'malar');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (35,'magesh');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (36,'senthil');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (37,'arul');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (38,'lakshmi');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (39,'sarasvathi');
Query OK, 1 row affected (0.00 sec)

mysql insert into customers(cust_id,cust_name)values (40,'linus');
Query OK, 1 row affected (0.00 sec)

mysql

mysql select * from customers;
+-++
| cust_id | cust_name  |
+-++
|   1 | guru   |
|   2 | gopal  |
|   3 | sathish|
|   4 | suresh |