Re: [PHP-DB] empty query

2003-01-26 Thread janet
In a message dated 1/25/2003 10:24:34 PM Pacific Standard Time, [EMAIL PROTECTED] writes: i have unsuccessfully tried for three days to write, re-write something that will insert data into my db and ashamedly have failed again. at one point i was able to echo values and see that they were

Re: [PHP-DB] empty query

2003-01-26 Thread Addison Ellis
thank you so much for responding... i added this: { echo $key, $valuebr; } underneath function storeForm($formdata,$ads) and it is now displaying this: year, 1971 make, chevy model, impala color, green mileage, condition, none price, other, Ad may not exceed 25 words. contact, [EMAIL PROTECTED]

[PHP-DB] dates and updates recommendation?

2003-01-26 Thread Paul Chvostek
Hiya. I'm looking for some design advice. I have a number of tables whose data consist of configuration details and parameters that are incorporated into config files for various server applications. For example, a table of customers' email address forwarding info, so a PHP application can be

[PHP-DB] Cutting strings

2003-01-26 Thread Chezney
Hi I have values in my table but for one of the fields I would only like to display the first 5 chars instead of 15 how is this possiable? -- Kind Regards, Chezney -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Cutting strings

2003-01-26 Thread Peter Lovatt
Hi from the manual http://www.mysql.com/doc/en/String_functions.html LEFT(str,len) Returns the leftmost len characters from the string str: mysql SELECT LEFT('foobarbar', 5); - 'fooba' HTH Peter -Original Message- From: Chezney [mailto:[EMAIL PROTECTED]] Sent: 26

Re: [PHP-DB] empty query

2003-01-26 Thread Jason Wong
On Sunday 26 January 2003 16:14, Addison Ellis wrote: Please do not top-post. i added this: { echo $key, $valuebr; } underneath function storeForm($formdata,$ads) and it is now displaying this: year, 1971 make, chevy model, impala color, green mileage, condition, none price, other,

Re: [PHP-DB] dates and updates recommendation?

2003-01-26 Thread Jason Wong
On Sunday 26 January 2003 17:02, Paul Chvostek wrote: So what's the best way to store a date? I've always liked storing epoch seconds as INTs, and leaving the translation to/from a human-readable date up to the application, but aside from the relative unreadability of this, are there any

Re: [PHP-DB] empty query

2003-01-26 Thread Addison Ellis
first, i must apologize as i am very new at this... and... i really appreciate your help. addison On Sunday 26 January 2003 16:14, Addison Ellis wrote: Please do not top-post. Sorry here... i added this: { echo $key, $valuebr; } underneath function storeForm($formdata,$ads) and it is

Re: [PHP-DB] empty query

2003-01-26 Thread Jason Wong
On Sunday 26 January 2003 18:59, Addison Ellis wrote: correct... i am able to echo values again. Hmm, okay :-) i had the following to carry forward cat and subcat values: ? session_start(); if (@$auth != yes) { header(Location: login.php); exit(); }

Re: [PHP-DB] empty query

2003-01-26 Thread Addison Ellis
whew! is there a tutorial you know of that might help me? in essence i have page 1 select category, page two select subcategory, page 3 fill out the form, click submit, data is entered into database, user is directed to a new page. i thought from this php 4.1 book that i was doing that. :-) i

RE: [PHP-DB] Cutting strings

2003-01-26 Thread Michael Uyttersprot
Use the substr function string substr ( string string, int start [, int length] ) http://be.php.net/manual/en/function.substr.php Greetz, Michael -Original Message- From: Chezney [mailto:[EMAIL PROTECTED]] Sent: dimanche 26 janvier 2003 10:08 To: [EMAIL PROTECTED] Subject: [PHP-DB]

RE: [PHP-DB] dates and updates recommendation?

2003-01-26 Thread John W. Holmes
[snip] Would I be better off spending a few bytes extra per record and storing things as DATETIME rather than an INT? If I'm looking at the possibily making the application more database-portable in the future, are there gotchas I should be aware of with any particular field types? This has

[PHP-DB] Using strlen and substr to Shorten DB Results

2003-01-26 Thread Jami
I have a script that I am working on that pulls info from a database: -- Code -- $getscname = mysql_query(SELECT * FROM subcat WHERE subcatid = '$subcatid') or die (Couldn't get the info.br.mysql_error()); while($sub_cat = mysql_fetch_array($getscname)){

[PHP-DB] Find and replace in a string

2003-01-26 Thread Nikos Gatsis
Hi list! I have a sting that contains some occurances of {...} sub-strings, where is some text. Which is the way to find and replace the {...} with an other of my own. This sub-strings start with { and end with }. Thanks

[PHP-DB] Re: Using strlen and substr to Shorten DB Results

2003-01-26 Thread Adam Royle
Try this. PHP arrays are cool! Of course there are tidier ways to implement this, but this is just an example. Adam -- Code -- $getscname = mysql_query(SELECT * FROM subcat WHERE subcatid = '$subcatid') or die (Couldn't get the info.br.mysql_error()); while($sub_cat =

RE: [PHP-DB] Find and replace in a string

2003-01-26 Thread John W. Holmes
I have a sting that contains some occurances of {...} sub-strings, where is some text. Which is the way to find and replace the {...} with an other of my own. This sub-strings start with { and end with }. If you know what the text is between { and }, then use $new_str =

RE: [PHP-DB] Using strlen and substr to Shorten DB Results

2003-01-26 Thread John W. Holmes
I have a script that I am working on that pulls info from a database: -- Code -- $getscname = mysql_query(SELECT * FROM subcat WHERE subcatid = '$subcatid') or die (Couldn't get the info.br.mysql_error()); while($sub_cat = mysql_fetch_array($getscname)){ $subcat_id =

Re: [PHP-DB] Find and replace in a string

2003-01-26 Thread Paul Chvostek
On Mon, Jan 27, 2003 at 12:57:10AM +0200, Nikos Gatsis wrote: Hi list! I have a sting that contains some occurances of {...} sub-strings, where is some text. Which is the way to find and replace the {...} with an other of my own. This sub-strings start with { and end with }. You could

[PHP-DB] Storing previous versions?

2003-01-26 Thread Leif K-Brooks
I'm planning to use a wiki-style help system for my website. I've considered using existing open-source wiki systems, but it would be too much work to get them hooked up with my user system, etc. Like most wikis, previous versions of articles will be stored. I'm looking for ideas as to the

Re: [PHP-DB] Calling functions recursively: recursive PHP functions

2003-01-26 Thread Kevin Gordon
Roberto Jason thank you for your comments. Please note the question at the end of this email. I searched on recursive PHP functions and found: [thelist] recursive PHP functions Rob Wilson thelist at lists.evolt.org Mon Sep 16 11:00:01 2002 * Previous message: [thelist] recursive PHP

RE: [PHP-DB] Calling functions recursively: recursive PHP functions

2003-01-26 Thread John W. Holmes
[snip] ?php function Test() { static $count = 0; $count++; echo $count; if ($count 10) { Test (); } $count--; } ? ** * Interesting but I am still lost as I need some help with