[PHP-DB] problem in updating data

2004-06-28 Thread Sukanto Kho
Hi All, I've created an function for update record in database's table. the function can handle all the record update from any table... with parameter passed in .. like this : function update($table,$values,$condition) { $link=$this->database(); $fields = mysql_list_fields("wellindo", $

[PHP-DB] phpmyadmin error

2004-06-28 Thread Sukanto Kho
Hi All, Sory if this question not belongs to this forum... I use PhpMyAdmin to control mysql database. and I want to set relationship between tables in mysql database... all things needed to make relationship have been set appears message : 'general relation features : enable' but I just cant

Re: [PHP-DB] Auto increament

2004-06-28 Thread Rinku
Thank you. It worked. Rinku --- Jonathan Haddad <[EMAIL PROTECTED]> wrote: > I believe the data type needs to be int - unless > mysql interprets > auto_increment as a int automatically. > > Here's an example from mysql.com > > > CREATE TABLE animals ( > id MEDIUMINT NOT NULL AUTO

Re: [PHP-DB] Call to undefined function mysql_connect()

2004-06-28 Thread Rinku
And If you need any documentation for Apache, PHP, Mysql and PhpMyAdmin Installation on WinXP or for WinNt then pls do write me I'll send it to you. Rinku --- "Larry E. Ullman" <[EMAIL PROTECTED]> wrote: > > But i received "Call to undefined function > mysql_connect() on line 5" > > > > Can anyone

[PHP-DB] Re: Php form & row delete problems

2004-06-28 Thread Vincent Jordan
I have tried this but somehow can not seem to get it working. I have incuded copy of the pages. thanks in advance for the assistance. ## start.php ( start page. calls DisplayUser.php with an ## Administrator Menu > User Information   Username Password Department

[PHP-DB] 2 requests: validate 2 password fields as equal and rewrite data

2004-06-28 Thread Vincent Jordan
Could someone instruct me or point me in the right direction. I would like to have a when submit it will check to se if password and password2 are = ( i do not want password2 to end up in POST on submit.) also i am trying to rewrite data from a tinyint. the tinyint will return 1 or 0, I have

[PHP-DB] Re: 2 requests: validate 2 password fields as equal and rewrite data

2004-06-28 Thread Torsten Roehr
>"Vincent Jordan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >Could someone instruct me or point me in the right direction. I would like to have a > when submit it will check to se if password and password2 are = ( i do not want >password2 to end up in POST on submit.) > >also i a

[PHP-DB] Re: problem in updating data

2004-06-28 Thread Torsten Roehr
>"Sukanto Kho" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >Hi All, > >I've created an function for update record in database's table. > >the function can handle all the record update from any table... with parameter passed in .. like this : > >function update($table,$values,$condit

Re: [PHP-DB] Dates and Count

2004-06-28 Thread Pablo M. Rivas
Hello Shannon, SD> First, I have two dates stored in a MySQL DB that I want to do a compare on SD> and then only display via a web page those records that have a 5 or greater SD> day difference in them. What would be the best way to achieve this. Depends on your mysql version... select * from

[PHP-DB] mysql_fetch_object

2004-06-28 Thread Bob Lockie
I'm using $row = mysql_fetch_object and I can reference column names by $row->name but how do I reference a pseudo column (that I make, like substring( name from 1 ))? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] mysql_fetch_object

2004-06-28 Thread Larry E . Ullman
I'm using $row = mysql_fetch_object and I can reference column names by $row->name but how do I reference a pseudo column (that I make, like substring( name from 1 ))? Use an alias in your query: SELECT column, DATE_FORMAT('%m', date_column) AS d FROM table ... $row->d Larry -- PHP Database Maili

Re: [PHP-DB] mysql_fetch_object

2004-06-28 Thread Bob Lockie
On 06/28/2004 12:07 PM Larry E.Ullman spoke: I'm using $row = mysql_fetch_object and I can reference column names by $row->name but how do I reference a pseudo column (that I make, like substring( name from 1 ))? Use an alias in your query: SELECT column, DATE_FORMAT('%m', date_column) AS d FROM

Re: [PHP-DB] mysql_fetch_object

2004-06-28 Thread Bob Lockie
On 06/28/2004 12:07 PM Larry E.Ullman spoke: I'm using $row = mysql_fetch_object and I can reference column names by $row->name but how do I reference a pseudo column (that I make, like substring( name from 1 ))? Use an alias in your query: SELECT column, DATE_FORMAT('%m', date_column) AS d FROM

Re: [PHP-DB] mysql_fetch_object

2004-06-28 Thread Hans_L
Bob Lockie wrote: On 06/28/2004 12:07 PM Larry E.Ullman spoke: I'm using $row = mysql_fetch_object and I can reference column names by $row->name but how do I reference a pseudo column (that I make, like substring( name from 1 ))? Use an alias in your query: SELECT column, DATE_FORMAT('%m', date

Re: [PHP-DB] mysql_fetch_object

2004-06-28 Thread Bob Lockie
How does it handle fully qualified conflicting columns, like 'select a.name, b.name from a, b'? It won't handle that properly; in your example $row->name would be b.name (it'd overwrite a.name). You have to alias same-named columns. Hans Ok, I don't have that case but I was curious. -- PHP Da

[PHP-DB] How to define array variable while accessing it ???

2004-06-28 Thread Rinku
While we want to access any variable value we can write Print $_POST['VariableName'] But it we want to access value for an array variable then what we should write ? Like for $chk_arr[$i] How to access this value in some particular function ? Pls read the code if you are not able to get my poi

Re: [PHP-DB] How to define array variable while accessing it ???

2004-06-28 Thread Matt M.
> " value="" > setup your checkbox something like this: http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] How to define array variable while accessing it ???

2004-06-28 Thread Torsten Roehr
"Matt M." <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > " value="" > > > setup your checkbox something like this: > > Regards, Torsten Roehr -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] PHP5 and SQLite

2004-06-28 Thread João Faria
Hello all ... I'm trying out the embedded SQLite client but i cant get it working =( I can do a sqlite_open without any notices .. but when i executed a query to create a new table, it said that the database could not be opened ... select commands ran ok, besides that they didnt find the tables

[PHP-DB] Load Data infile help needed

2004-06-28 Thread Chris Payne
Hi there everyone, I'm having a problem loading in a text file, each column is enclosed with a " and separated by a , but when I try the below, it loads in the data BUT it puts a " to the left of each character. Any help would be really appreciated. Thank you Chris mysql_query("

[PHP-DB] Prepared statements via mssql extension

2004-06-28 Thread Gerard Samuel
Is it possible? Just checking... -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: Prepared statements via mssql extension

2004-06-28 Thread Hans Lellelid
Gerard Samuel wrote: Is it possible? Just checking... It's not unless you use stored procedures. It'd be nice ... :) Stored procedures via mssql_init(), mssql_bind() and mssql_execute() work quite well, though. Read the user comments in the manual as they will help you get over some common got