Re: [PHP-DB] Inserting a date in to DATE field

2004-04-22 Thread John W. Holmes
Pambos Nicolaou wrote: Is there any MySQL command which inserts the date into a DATE field of a table automatically. For example the user inserts into the table several values (name, age, etc) and the date is inserted automatically. Set the column equal to NOW() or use a TIMESTAMP column (which

[PHP-DB] assigning variables after one-to-many query

2004-04-22 Thread Rachel Rodriguez
Hi! I have a one-to-many relationship between two tables (table1 and table3) with a "linking" table between them (table2): table1: table2 +---++ +---++ |id | f_name | |id | emailID| +---++ +---++ | 1 | bill | | 1 | 1| | 2

Re: [PHP-DB] Inserting a date in to DATE field

2004-04-22 Thread George Patterson
On Fri, 23 Apr 2004 01:32:36 + "Pambos Nicolaou" <[EMAIL PROTECTED]> wrote: > Hi everyone, > > Is there any MySQL command which inserts the date into a DATE field of > a table automatically. For example the user inserts into the table > several values (name, age, etc) and the date is inserted

[PHP-DB] Inserting a date in to DATE field

2004-04-22 Thread Pambos Nicolaou
Hi everyone, Is there any MySQL command which inserts the date into a DATE field of a table automatically. For example the user inserts into the table several values (name, age, etc) and the date is inserted automatically. Thanks in advance Pambos.

[PHP-DB] Problem after upgrading php ...

2004-04-22 Thread Hugh Taylor
I recently upgraded an existing 4.0.2 php installation to 4.3.6. Everything seemed to go OK (except I couldn't configure --with-imap, I'm not sure I have the imap source installed), but once I restarted everything some php pages that connect to a mysql database stopped working. The application

Re: [PHP-DB] using a define value

2004-04-22 Thread J. Alejandro Ceballos Z.
Then, is not possible to use a definition table for errors or equivalents?. It must be a variable value or a hash? I am using this for error messages after a CGI execution. That is why planning to use a code for error, and definition table show the specific message. Like "http://myphppage.php?

[PHP-DB] Re: [PHP] What's wrong with this IF statement?

2004-04-22 Thread Chris Shiflett
--- Robert Sossomon <[EMAIL PROTECTED]> wrote: > if ($cat_id != "53" || $cat_id != "54" || $cat_id != "55" || $cat_id > != "117" || $cat_id != "118" || $cat_id != "74") That looks like a pretty big logical flaw to me. Just read that out loud to yourself. It should be clear that this statement is e

Re: [PHP-DB] What's wrong with this IF statement?

2004-04-22 Thread Miles Thompson
Don't cross post -- you'll eventually annoy enough people that they'll stop responding! Here are some suggestions: Are you closing braces properly? (Assume you must be, otherwise errors would be thrown. Have you echoed your $cat_id so you know if you are getting? Use the in_array function to s

[PHP-DB] Re: [PHP] What's wrong with this IF statement?

2004-04-22 Thread John W. Holmes
From: "Robert Sossomon" <[EMAIL PROTECTED]> > if ($cat_id != "53" || $cat_id != "54" || $cat_id != "55" || $cat_id > != "117" || $cat_id != "118" || $cat_id != "74") Okay, if $cat_id is 53, this will work out to: if(FALSE || TRUE || TRUE || TRUE || TRUE || TRUE) which results in TRUE overall.

[PHP-DB] Re: [PHP] What's wrong with this IF statement?

2004-04-22 Thread Daniel Clark
What about removing the quotes around the numbers. if ($cat_id != 53 || $cat_id != 54 || $cat_id != 55 etc... > My IF statement should be picking up on the numbers, and if the number > matches not be displaying out the information, however I look at the > outputted page and the information is s

[PHP-DB] Re: What's wrong with this IF statement?

2004-04-22 Thread Torsten Roehr
"Robert Sossomon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > My IF statement should be picking up on the numbers, and if the number > matches not be displaying out the information, however I look at the > outputted page and the information is still there, what have I got wrong >

[PHP-DB] What's wrong with this IF statement?

2004-04-22 Thread Robert Sossomon
My IF statement should be picking up on the numbers, and if the number matches not be displaying out the information, however I look at the outputted page and the information is still there, what have I got wrong on the code? //Show categories first $get_cats = "select id_num, id_name, descriptio

[PHP-DB] Anyone Subscibed to PHP-GTK-General?

2004-04-22 Thread dpgirago
Warning: This is OT. Just wondering if anyone receives emails from [EMAIL PROTECTED] I've subscribed and received a confirmation response, but my emails to that list get returned, and I receive no posts from anyone else. Does anyone know if [EMAIL PROTECTED] is active? dave

[PHP-DB] Include Files Solution

2004-04-22 Thread Robert Sossomon
Here's the solution I came up with that works for the site: $display_block .= ""; I am only using the PHP parser once instead of twice, the \n makes the whole thing nicely readable in the HTML source files that are generated, and the paths were modified (and the navigation templates were as

[PHP-DB] RE: [PHP] Adding includes to files

2004-04-22 Thread Robert Sossomon
OK, so I figured out where it was barfing. I looked deeper into the log files as well as the generated pages, and found that somewhere the path to the include files had become mangled, and the reason the files weren't showing correctly in the HTML pages in the browser was because it couldn't find

[PHP-DB] RE: [PHP] Adding includes to files

2004-04-22 Thread Robert Sossomon
Output buffering isn't going to help, the files, when completed need to look like: Categories of Items Html content If all I was trying to do was pull in the files I could do that without a problem, but what I need to do is generate the whole page with the information. I attached the

[PHP-DB] RE: [PHP] Remove white space?

2004-04-22 Thread Chris W. Parker
Robert Sossomon on Thursday, April 22, 2004 7:51 AM said: > I am pulling data from a MySQL DB and I need to remove the whitespace > on the variable and turn it to lowercase. remove whitespace *on* the variable?? i don't get it. chris. -- PHP Database Mailing L

[PHP-DB] Re: [PHP] Adding includes to files

2004-04-22 Thread John W. Holmes
From: "Robert Sossomon" <[EMAIL PROTECTED]> > I need to add PHP calls to include a file to each page as it is > generated, the only thing is I can't get the includes to come through > correctly: > > >$display_block .= ""; >$display_block .= ""; > > > At the end of the generation I writ

[PHP-DB] Adding includes to files

2004-04-22 Thread Robert Sossomon
I need to add PHP calls to include a file to each page as it is generated, the only thing is I can't get the includes to come through correctly: $display_block .= ""; $display_block .= ""; At the end of the generation I write $display_block to a file as $display_block holds all the data i

Re: [PHP-DB] Remove white space?

2004-04-22 Thread Miles Thompson
1. Don't cross-post! 2. Read the string functions in the php manual. You probably don't want to remove all white space, just trim. Have a look at http://ca3.php.net/manual/en/function.trim.php 3. You will find a function to do exactly what you want. Regards - Miles Thompson At 10:51 AM 4/22/2004

[PHP-DB] Re: Remove white space?

2004-04-22 Thread Torsten Roehr
"Robert Sossomon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am pulling data from a MySQL DB and I need to remove the whitespace on > the variable and turn it to lowercase. > > > > $get_items = "select * from PFS_items"; > $get_items_res = mysql_query($get_items) or die(mysql_

RE: [PHP-DB] Remove white space?

2004-04-22 Thread Hutchins, Richard
Robert, ltrim() or rtrim() to get rid of the whitespace if it's at the beginning or end of the data. strtolower() to turn the string into all lowercase characters. Rich > -Original Message- > From: Robert Sossomon [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 22, 2004 10:51 AM > To

[PHP-DB] Remove white space?

2004-04-22 Thread Robert Sossomon
I am pulling data from a MySQL DB and I need to remove the whitespace on the variable and turn it to lowercase. $get_items = "select * from PFS_items"; $get_items_res = mysql_query($get_items) or die(mysql_error()); while ($items = mysql_fetch_array($get_items_res)) { $item_id = $items[id]; $i

Re: [PHP-DB] Problem with update-command

2004-04-22 Thread Torsten Roehr
"Jeffrey N Dyke" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >$result=mysql_db_query("usr_172_1","UPDATE artikel SET Preis='\$preis\' > WHERE ID='\$id\'"); > >//mysql_error($result); > > Here you're escaping the $ and then the ', have you tried > > $result=mysql_db_query("usr_

[PHP-DB] Re: Selecting Null columns

2004-04-22 Thread pete M
SELECT * FROM questions WHERE answer IS NULL SELECT * FROM questions WHERE answer IS NOT NULL Pambos Nicolaou wrote: Hi everyone I am a new user of this mail list and I hope that it will be helpful. I am trying to show the content of a MySQL table(raw) where the content of a column is NOT NUL

Re: [PHP-DB] Problem with update-command

2004-04-22 Thread jeffrey_n_Dyke
>$result=mysql_db_query("usr_172_1","UPDATE artikel SET Preis='\$preis\' WHERE ID='\$id\'"); >//mysql_error($result); Here you're escaping the $ and then the ', have you tried $result=mysql_db_query("usr_172_1","UPDATE artikel SET Preis='{$preis}' WHERE ID='{$id}'"); with those escapes th

[PHP-DB] Problem with update-command

2004-04-22 Thread Ruprecht Helms
Hi, In the attached file I've a problem with the update-procedure. The procedured gets its values from a formular an should update an articlerecordset as needed. After update I get not the result of the updating, the old value is stored in the database. How have I to rewrite the lines for proper