RE: [PHP-DB] Re: Making a txt file from db data, is it possible?

2002-04-08 Thread Rick Emery
fopen() fwrite() fclose() -Original Message- From: Raymond [mailto:[EMAIL PROTECTED]] Sent: Monday, April 08, 2002 12:05 PM To: Frank Flynn; [EMAIL PROTECTED] Subject: [PHP-DB] Re: Making a txt file from db data, is it possible? Hi! Ok, I think I maybe have to explain this a little

RE: [PHP-DB] Insert, Arrays, Null

2002-04-05 Thread Rick Emery
When you say ...account for either a numeric or NULL value ..., do you mean SELECT a value that could be NULL? If so, the query is SELECT * FROM mytable WHERE cusa IS NULL || cusa = 0 -Original Message- From: Zach Curtis [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 9:11 AM

RE: [PHP-DB] Insert, Arrays, Null

2002-04-05 Thread Rick Emery
[cusa]; \\ repeat for each variable else $cusa = NULL;\\ repeat for each variable $query = INSERT INTO mytable (cusa,cusb,cusc) VALUES($cusa,$cusb,$cusc); ? -Original Message- From: Zach Curtis [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 9:29 AM To: Rick Emery

RE: [PHP-DB] Insert, Arrays, Null

2002-04-05 Thread Rick Emery
Using VALUES() is faster Nothing really wrong with SET clause, though -Original Message- From: Zach Curtis [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 10:34 AM To: Rick Emery; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Insert, Arrays, Null Terrific! I tried an example

RE: [PHP-DB] Stuck on db entry from select box...

2002-04-05 Thread Rick Emery
jas, Ya didn't do what I told you to do. Now, do this: SELECT NAME=\files\; $sql = UPDATE $table_name SET file_name=\$files\; -Original Message- From: Jas [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 12:01 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Stuck on db entry from

RE: [PHP-DB] Stuck on db entry from select box...

2002-04-05 Thread Rick Emery
I had a typo: $sql = UPDATE $table_name SET file_name=\$files\; -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 12:29 PM To: 'Jas'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Stuck on db entry from select box... jas, Ya didn't do what I told

RE: [PHP-DB] Submitting Dynamic Form

2002-04-04 Thread Rick Emery
, 2002 12:51 AM To: Rick Emery Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Submitting Dynamic Form Ah, I just knew there must be an easy way of doing it. Thanks Rick ! Is there a good reference on stuff like this with some examples ? Am I pushing the friendship ? :-) Rick Emery wrote

RE: [PHP-DB] Database Sorting by date

2002-04-04 Thread Rick Emery
Ron, What problem are you having? I'm looking at your code, and it's so clean, I could eat off of it. My only suggestion would be that $month will NEVER == NULL. If you are testing for NULL, the test is: if ($month == NULL ) Second, $month will be assigned a value, so it will never be NULL

RE: [PHP-DB] How to link a MYSQL table to a dbase file

2002-04-04 Thread Rick Emery
Can you use a cron (Unix) or at (Windows) job to dump the dbase data to a comma-separated-value table? Then suck up the csv into the mysql databasde. -Original Message- From: Marij Bellen [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 8:37 AM To: '[EMAIL PROTECTED]' Cc:

RE: [PHP-DB] Database Sorting by date

2002-04-04 Thread Rick Emery
]] Sent: Thursday, April 04, 2002 8:41 AM To: Rick Emery Subject: RE: [PHP-DB] Database Sorting by date The query fails when I try to look at a month it says Query Failed Ronald L. Allen (MCSE NT, MCP, CCNA) SR. LAN/WAN Administrator SFOR - Hungary, Croatia [EMAIL PROTECTED] [EMAIL PROTECTED

RE: [PHP-DB] Editing/Updating Data with Forms

2002-04-04 Thread Rick Emery
Josh, Your question is too vague to answer. Do you know mysql? Do you know PHP or PERL? If not, learn these, then ask. If so, create code, then ask -Original Message- From: Evans, Josh [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 9:31 AM To: [EMAIL PROTECTED] Subject:

RE: [PHP-DB] How to link a MYSQL table to a dbase file

2002-04-04 Thread Rick Emery
cron is an application/utility on ALL unix servers. It is used to execute ANY unix command or script at specified dates, times, etc. type the following to learn more: man cron man ctrontab your cron job would execute the command to translate the dbase file to sql. Then execute mysql to read in

RE: [PHP-DB] New to PHP Need Help

2002-04-04 Thread Rick Emery
Jason, If you don't have one, I would also recommend a good book that combines PHP and MYSQL interaction. I would strongly suggest the one I cut my PHP teeth on: PHP Essentials by Julie Meloni -Original Message- From: Julie Meloni [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04,

RE: [PHP-DB] Please help count ?

2002-04-04 Thread Rick Emery
$post = ereg_replace((.*) ,\\1, $old_post); If you want to search mysql for this that is something else -Original Message- From: Dave Carrera [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 10:29 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Please help count ? Hi All I

[PHP-DB] RE: [PHP] New to PHP Need Help

2002-04-04 Thread Rick Emery
change: $Location_Info = mysql_fetch_row($result); to: $row = mysql_fetch_array($result); $Location_Info = $row['fieldname']; replace fieldname with the real name of your database field -Original Message- From: Jason Tobias [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 04, 2002 9:29

RE: [PHP-DB] Problem with the beginning variable

2002-04-03 Thread Rick Emery
show your code -Original Message- From: Ron Allen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 5:43 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Problem with the beginning variable I have a problem with the inital load of my page When it loads it says that the variable is

RE: [PHP-DB] figuring out number of months between two dates

2002-04-02 Thread Rick Emery
select PERIOD_DIFF(DATE_FORMAT(2002-04-01,%Y%m), DATE_FORMAT(2001-0801,%Y%m) ) as dd; +--+ | dd | +--+ |8 | +--+ 1 row in set (0.00 sec) -Original Message- From: John Hughes [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 02, 2002 2:28 AM To: [EMAIL PROTECTED] Subject:

RE: [PHP-DB] autoincrement

2002-04-02 Thread Rick Emery
what command are you using? When posting questions, give all details...wee can't read your mind -Original Message- From: Daniel Broome [mailto:[EMAIL PROTECTED]] Sent: Monday, April 01, 2002 9:33 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] autoincrement I am trying to add auto

RE: [PHP-DB] Return the last record on database

2002-03-29 Thread Rick Emery
SELECT * FROM mytable ORDER BY some_field DESC LIMIT 1; -Original Message- From: Ron [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 7:39 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Return the last record on database My database has several records an ID is the primary key I

RE: [PHP-DB] end of file

2002-03-29 Thread Rick Emery
while( $row = mysql_fetch_array($result) ) { } -Original Message- From: Natividad Castro [mailto:[EMAIL PROTECTED]] Sent: Friday, March 29, 2002 2:59 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] end of file Hi to all, how can I handle when the recordset reach the last record? is it

RE: [PHP-DB] MySQL/PHP Update

2002-03-28 Thread Rick Emery
Jason, this is intriguing. Please show us a bit more code before the mysql_query() call. -Original Message- From: Jason [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 1:54 AM To: Php-Db Subject: [PHP-DB] MySQL/PHP Update I'm trying to update my MySQL database, but it

RE: [PHP-DB] Selecting Drop Down Value From DB to Edit

2002-03-27 Thread Rick Emery
I'm trying to decipher: when I select the record to edit the drop-downlist has the first option as the value instead of what the corresponding StateID in the column reads. How can I correct this? The form to insert and edit have the below code and correctly

RE: [PHP-DB] Big Problems Connecting to MySQL

2002-03-27 Thread Rick Emery
You need to ensure that mysql.sock has the correct read-write-execute permissions Check the mail list archives; this question is asked and answered EVERY week -Original Message- From: Liam Gibbs [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 1:17 PM To: [EMAIL PROTECTED]

RE: [PHP-DB] Very wierd problem ;-(

2002-03-27 Thread Rick Emery
show you code and db table struct -Original Message- From: Dave Carrera [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 2:38 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Very wierd problem ;-( Hi All I will try and explain as clearly as I can I have a message board

RE: [PHP-DB] include() statement hell!

2002-03-27 Thread Rick Emery
did you start each include file with: ?php ? If not, PHP treats the code within as straight text -Original Message- From: Brad Melendy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 27, 2002 5:03 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] include() statement hell! Ok, I've spent

RE: [PHP-DB] procedures?

2002-03-26 Thread Rick Emery
I suggest subscribing to the mysql mailing list and asking the question. [EMAIL PROTECTED] -Original Message- From: Chris Payne [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 7:47 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] procedures? Hi there, Where can I find information

RE: [PHP-DB] 2 related ?'s email users

2002-03-25 Thread Rick Emery
There's a bunch of ways to accomplish what you request. Therefore, I'll offer what I would do. Other folks, more brilliant than, will provide better ideas. 1. Do you have access to the mail server? For instance, I run qmail on my SOHO system and, therefore, have full sys-admin rights. If

RE: [PHP-DB] delete statement question

2002-03-25 Thread Rick Emery
if you are using mysql 4.x, you might try: DELETE answers FROM exam e, questions q, answers a WHERE a.question_id=q.question_id q.exam_id=e.exam_id; I've not tested this, though. -Original Message- From: Andrés Felipe Hernández [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002

RE: [PHP-DB] delete statement question

2002-03-25 Thread Rick Emery
this solution will not work for mysql databases, as mysql does not support sub-selects -Original Message- From: Bill Morrow [mailto:[EMAIL PROTECTED]] Sent: Monday, March 25, 2002 2:02 PM To: Andr?s Felipe Hern?ndez Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] delete statement question

RE: [PHP-DB] I have been trying to introduce data in a MySQL database but I don't achieve it.

2002-03-25 Thread Rick Emery
First: what error are you getting? Second, make your code more readable and easier to debug: $query = INSERT INTO usuario (USU_USUARIO, USU_CLAVE, USU_NOMBRE, USU_EMPRESA, USU_DIRECCION, USU_TELEFONO, USU_CIUDAD, USU_DEPARTAMENTO, USU_PAIS, USU_EMAIL, USU_REPCLAVE, USU_TIPCLIENTE). VALUES

RE: [PHP-DB] delete statement question

2002-03-25 Thread Rick Emery
, andres - Original Message - From: Rick Emery [EMAIL PROTECTED] To: Andr?s Felipe Hern?ndez [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, March 25, 2002 12:03 PM Subject: RE: [PHP-DB] delete statement question this solution will not work for mysql databases, as mysql does not support

RE: [PHP-DB] Forms

2002-03-22 Thread Rick Emery
First: cross-posting to multiple lists...not nice. Most PHP folks are on both lists. Second: your first sentence seems to indicate that unknowledgeable people inhabit the PHP list, vice the PHP-DB list. H GRIN Third: what error do you get when you get the parsing error? -Original

RE: [PHP-DB] marking DB entries...

2002-03-22 Thread Rick Emery
store and validate a username and password with each user's info -Original Message- From: Ljungan [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 11:07 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] marking DB entries... Im making an adressbook using PHP and mySQL. I want each user

RE: [PHP-DB] marking DB entries...

2002-03-22 Thread Rick Emery
and adressreg ??? /ljungan Rick Emery [EMAIL PROTECTED] skrev i meddelandet [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... store and validate a username and password with each user's info -Original Message- From: Ljungan [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22,

RE: [PHP-DB] Multiple SELECT querys

2002-03-22 Thread Rick Emery
$query = SELECT myvalue FROM mytable WHERE some_condition; $result = mysql_query($query) or die(Error: .mysql_error()); $srch = ; while( list($myvalue) = mysql_fetch_array($result) { $srch .= $myvalue, ; } $srch = substr($srch, 0, -2); $query = SELECT * FROM other_table WHERE this_val

RE: [PHP-DB] Re: Relational database

2002-03-21 Thread Rick Emery
What do you mean last record in a table? What are you REALLY trying to do here? Do you want the last entry made according to a specific criteria? -Original Message- From: Ron [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 9:20 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re:

RE: [PHP-DB] Re: Relational database

2002-03-21 Thread Rick Emery
Huh -Original Message- From: Ron [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 9:30 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: Relational database But can you do that in PHP before you pull info from it -- PHP Database Mailing List (http://www.php.net/) To

RE: [PHP-DB] Selecting Alphabetically

2002-03-21 Thread Rick Emery
SELECT * FROM mytable WHERE record_name REGEXP ^[a-h] -Original Message- From: Jordan Elver [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 6:05 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Selecting Alphabetically Hi, Could anyone point me in the right direction with this one

RE: [PHP-DB] LAST_INSERT_ID()

2002-03-21 Thread Rick Emery
use mysql_last_id() -Original Message- From: Morten Nielsen [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 2:30 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] LAST_INSERT_ID() Hi, In the PHP manual under the function mysql_insert_id() function they have the following line: The

RE: [PHP-DB] LAST_INSERT_ID()

2002-03-21 Thread Rick Emery
I mean: mysql_insert_id() -Original Message- From: Rick Emery [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 2:28 PM To: 'Morten Nielsen'; [EMAIL PROTECTED] Subject: RE: [PHP-DB] LAST_INSERT_ID() use mysql_last_id() -Original Message- From: Morten Nielsen

RE: [PHP-DB] Need Help with returning new id's

2002-03-19 Thread Rick Emery
first, it helps if you show us your REAL code. The query statement you showed below would obviously not work (it's missing the mysql_query part. Second, when executing mysql_query() ALWAYS include the or die(mysql_error()) part to aid diagnostics. Third, your query could not possibly work at the

RE: [PHP-DB] date problem

2002-03-14 Thread Rick Emery
if( strcmp($date,-00-00) ) { do something} -Original Message- From: its me [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 12:16 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] date problem i have an input field in a form that accept date called $date and in databse i made it

RE: [PHP-DB] Delete problem

2002-03-13 Thread Rick Emery
MySQL does not currently support sub-selects. The manual says: DELETE [LOW_PRIORITY | QUICK] FROM table_name [WHERE where_definition] [ORDER BY ...] [LIMIT rows] Did you review the manual first? -Original Message- From: Riccardi Moreno [mailto:[EMAIL PROTECTED]] Sent:

RE: [PHP-DB] SQL Question

2002-03-13 Thread Rick Emery
SELECT DISTINCT city FROM addresses; -Original Message- From: Kevin Diffily [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 13, 2002 1:05 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] SQL Question Hello, I have a simple SQL Question. I would like to take the column city in database

RE: [PHP-DB] select rows from more than one table, how?

2002-03-11 Thread Rick Emery
First: show us your exact query Second: show us your exact error response Third: show us your exact code and table structure -Original Message- From: Sander Peters [mailto:[EMAIL PROTECTED]] Sent: Monday, March 11, 2002 3:03 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] select rows from

RE: [PHP-DB] how can i join this two selects

2002-03-11 Thread Rick Emery
Vieliecht: SELECT kat_id,immo_id FROM immo_kat WHERE immo_id=318 (kat_id = '1' OR kat_id = '35' OR kat_id = '34') ORDER BY immo_id; -Original Message- From: Michael Plies [mailto:[EMAIL PROTECTED]] Sent: Monday, March 11, 2002 4:01 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] how can i

RE: [PHP-DB] mysql LIMIT and ORDER BY problem

2002-02-20 Thread Rick Emery
it works for me. What do your data and table structures look like? -Original Message- From: Fredrik Wahlberg [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 4:55 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] mysql LIMIT and ORDER BY problem I have a strange problem with

RE: [PHP-DB] mysql and auto_increment

2002-02-20 Thread Rick Emery
First, what do you mean by regs? If I understand your question, you want to know if mysql will re-use an old auto_increment value that has been deleted. The answer is yes and no. If you say: DELETE FROM mytable; then the next insertion will cause the auto_increment value to begin at 1 If you

RE: [PHP-DB] SQL

2002-02-20 Thread Rick Emery
I tried the HAVING clause. it fails. This requires sub-selects or multiple tables -Original Message- From: DL Neil [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 10:27 AM To: Jonathan Underfoot; Rick Emery; [PHP-DB] Subject: Re: [PHP-DB] SQL Jonathan, The original

RE: [PHP-DB] Problem displaying dates

2002-02-19 Thread Rick Emery
Mate, what code/function are you using to convert the dates? what do your data look like in the table (structure, examples)? -Original Message- From: George Pitcher [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 8:01 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Problem

RE: [PHP-DB] Need some code examples on creating tables for mysql in php

2002-02-19 Thread Rick Emery
Huh $query = CREATE TABLE mytable (. field1 int,. field2 varchar(50),. field3 decimal(6,2),. field4 int,. field5 int ); mysql_query($query) or die(Error: .mysql_error()); -Original Message- From: CrossWalkCentral [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 12:26 PM

RE: [PHP-DB] SQL

2002-02-19 Thread Rick Emery
How could you possibly have such a condition exist? That is, what relation do the counts have to the contents of the name field? What ARE you trying to really accomplish? -Original Message- From: Jonathan Underfoot [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 2:57 PM To:

RE: [PHP-DB] Problem connecting to db on Linux

2002-02-18 Thread Rick Emery
Have you spelled the name of the database correctly, including case sensitivity? What error message are you getting to indicate failure? -Original Message- From: George Pitcher [mailto:[EMAIL PROTECTED]] Sent: Monday, February 18, 2002 8:21 AM To: Greg Donald; [EMAIL PROTECTED] Subject:

RE: [PHP-DB] Problem connecting to db on Linux

2002-02-18 Thread Rick Emery
, 2002 8:48 AM To: Rick Emery; Greg Donald; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Problem connecting to db on Linux Rick, I snipped the code from my windoze system. I did have to change the case of the dbname to reflect the Linux version (all lc). The error message I got (not displayed on screen

RE: [PHP-DB] Problem connecting to db on Linux

2002-02-18 Thread Rick Emery
is obvious? George - Original Message - From: Rick Emery [EMAIL PROTECTED] To: 'George Pitcher' [EMAIL PROTECTED]; Rick Emery [EMAIL PROTECTED]; Greg Donald [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 18, 2002 3:19 PM Subject: RE: [PHP-DB] Problem connecting to db on Linux Do

RE: [PHP-DB] Problem connecting to db on Linux

2002-02-18 Thread Rick Emery
resource in /var/www/html/HERONweb/home.php on line 32 I have 'echo mysql_errno();' just after the query is called but no number is being displayed. George - Original Message - From: Rick Emery [EMAIL PROTECTED] To: 'George Pitcher' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, February 18

RE: [PHP-DB] Time Difference

2002-02-15 Thread Rick Emery
Are you saying you got two different return values with the exact same input values for $hour, $minute, $second, $month, $day, $year?? -Original Message- From: Lerp [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 8:46 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Time Difference

RE: [PHP-DB] formating w/ table

2002-02-15 Thread Rick Emery
Your /table is inside your loop. So it is executed once to terminate the table. After that, the browser just sees the rest as straight text. -Original Message- From: jas [mailto:[EMAIL PROTECTED]] Sent: Friday, February 15, 2002 2:35 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] formating

RE: [PHP-DB] formatting w/ table

2002-02-15 Thread Rick Emery
Further, I recommend replacing your echos with the following: echo trtd width=\30%\BType Of Car: /B/tdtd. $myrow['car_type']./td/tr\n; echo trtd width=\30%\BModel Of Car: /B/tdtd. $myrow['car_model']./td/tr\n; echo trtd width=\30%\BYear Of Car: /B/tdtd. $myrow['car_year']./td/tr\n; echo trtd

RE: [PHP-DB] Disable Right click w/ php?

2002-02-14 Thread Rick Emery
You can't do this using PHP, because PHP is server-side. You will need JavaScript. -Original Message- From: jas [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 12:18 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Disable Right click w/ php? I have been looking on php.net for

RE: [PHP-DB] Time Question

2002-02-14 Thread Rick Emery
?php $t = date(m/d/Y h:i:s A, gettimeofday()); print $t; ? -Original Message- From: Lerp [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 12:45 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Time Question Hi there. Got a bit of a snag. I'm migrating an ASP app to PHP with a

RE: [PHP-DB] Time Question

2002-02-14 Thread Rick Emery
CORRECTION: ?php $t = date(m/d/Y h:i:s A, time()); print $t; ? -- C:\php -f a.php 02/14/2002 12:49:50 PM -Original Message- From: Lerp [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 12:45 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Time Question Hi there.

RE: [PHP-DB] Form Validation

2002-02-14 Thread Rick Emery
addslashes() stripslashes() Your question is vague... -Original Message- From: jas [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 1:32 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Form Validation Anyone know of a good function to strip characters and stuff that would

RE: [PHP-DB] First and Last Record Query

2002-02-13 Thread Rick Emery
Why are you iterating through the array? Why not just: $start_id = $row[0]; $end_id = $row[count($row)-1]; -Original Message- From: David Fudge [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 11:40 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] First and

RE: [PHP-DB] undeclared variable error

2002-02-13 Thread Rick Emery
change: if ($submit) { to: if (ISSET($submit)) { -Original Message- From: Dan Howard [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 12:21 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] undeclared variable error Folks, I am very new to PHP, and have been working through

RE: [PHP-DB] Passing form values with quotes, to itself

2002-02-13 Thread Rick Emery
try: input type=text name=Body value=quot;?php echo $Body; ?quot; Also, please include a sample field value and the results of our tests -Original Message- From: Faye Keesic [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 12:03 PM To: [EMAIL PROTECTED] Subject: [PHP-DB]

RE: [PHP-DB] A while loop prob ?

2002-02-13 Thread Rick Emery
Need to show us more code. For instance: where is $srchrow set? Next, change: if ($submit){ to: if (ISSET($submit)) { Why are you over-writing $name, $details, $price, $imgloc with list() before you even use them? -Original Message- From: Dave Carrera [mailto:[EMAIL PROTECTED]]

RE: [PHP-DB] undeclared variable error

2002-02-13 Thread Rick Emery
change: ?php echo $PHP_SELF? to: ?php echo $PHP_SELF;? note the semi-colon -Original Message- From: Dan Howard [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 2:34 PM To: Rick Emery; [EMAIL PROTECTED] Subject: RE: [PHP-DB] undeclared variable error Thanks Rick

RE: [PHP-DB] mysql_connect()

2002-02-12 Thread Rick Emery
What is the exact error you are getting? I'm going to guess something along the lines of unidentified function mysql_connect(). If that's the case, that means you do not have mysql functionality compiled into your web server. Speaking of which: what is your Linux system (RedHat SuSe, etc)?

RE: [PHP-DB] Drop Down Menus

2002-02-12 Thread Rick Emery
FROM THE MANUAL: mysql_fetch_row() fetches one row of data from the result associated with the specified result identifier. The row is returned as an array. Each result column is stored in an array offset, starting at offset 0. Therefore: print(option value=\$row[0]\$row[0]/option\n);

RE: [PHP-DB] mysql_connect()

2002-02-12 Thread Rick Emery
Re-read my previous email. You do not have mysql functionality compiled into PHP and you web server. The clue is the phrase undefined function: mysql_connect(). How did you load PHP, MYSQL, etc? -Original Message- From: Martin Allan Jensen [mailto:[EMAIL PROTECTED]] Sent: Tuesday,

RE: [PHP-DB] mysql and dropdown menus

2002-02-12 Thread Rick Emery
When you include $Select in your URL, did you remember to urlencode() it first? If no, the spaces will blow your URL away...very nasty... BTW, it helps if you post code. -Original Message- From: jeff akerman [mailto:[EMAIL PROTECTED]] Sent: Monday, February 11, 2002 4:27 PM To: [EMAIL

RE: [PHP-DB] Select rows where ?

2002-02-12 Thread Rick Emery
select * from tablename where field NOT LIKE %A%; -Original Message- From: Dave Carrera [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 12:39 PM To: php List Subject: [PHP-DB] Select rows where ? Hi All How do I select the rows that DO NOT contain a certain character. I.e.

RE: [PHP-DB] numeric string problem

2002-02-12 Thread Rick Emery
The question is: why use varchar? Why not use INT, then format to includes commas when displaying? -Original Message- From: Mike [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 12, 2002 3:38 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] numeric string problem Hi, I am using VARCHAR

RE: [PHP-DB] Required pages...

2002-02-12 Thread Rick Emery
Verify that $HTTP_REFERER is the URL the user was supposed to come from. Somethig like (you may have to tweak it because I cannot test where I am now): if( strcmp($HTTP_REFERER,www.mydomain.com/login.html) ) { header(Location: http://www.mydomain.com/login.html;); exit; }

RE: [PHP-DB] MySQL / PHP Database Help

2002-02-08 Thread Rick Emery
Yes, you can re-select from the same database without opeing a new connection. I recommend that you print the contents od $newquery to verify it contains the string you think it should. Perhaps the apostrophes you've enclosed the $row[] variable are not expanding. -Original Message-

RE: [PHP-DB] Can't get left join to work

2002-02-08 Thread Rick Emery
[mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 5:42 AM To: Rick Emery Subject: Re: [PHP-DB] Can't get left join to work Thank you! I'm obviously going to have to read up on that 'on ... ' syntax - it's not something I'm familiar with. Paul Rick Emery wrote: And the answer

RE: [PHP-DB] Need to delete charcters from a string (Works)

2002-02-08 Thread Rick Emery
$mystring = substr($mystring,0,-3); - Original Message - From: Renaldo De Silva [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, February 07, 2002 8:56 PM Subject: [PHP-DB] Need to delete charcters from a string I need to delete the last 3 character of

RE: [PHP-DB] Need to delete charcters from a string

2002-02-08 Thread Rick Emery
You were close: $mystr = substr($mystr, 0, -3); -Original Message- From: Renaldo De Silva [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 7:36 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Need to delete charcters from a string This dosen't quite do what i need, this

RE: [PHP-DB] Deleting characters from a string...

2002-02-08 Thread Rick Emery
If you are certain the format will ALWAYS be as you indicate, then try: eregi(width=([0-9]*) height=([0-9]*), $mystring, $reg); $newstring = $reg[1], x .$reg[2]; NOTE: I don't have PHP here at work (I've got it at home). So you may have to tweak this. -Original Message- From: Luke

RE: [PHP-DB] Exact String replace with eregi_replace()

2002-02-08 Thread Rick Emery
First, the example you give will replace is with , if is is the ONLY work in the line. You indicate this with the ^$ construct. Are you trying to replace only the first occurrence if is? -Original Message- From: Desikan [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 6:42

RE: [PHP-DB] MySQL / PHP Database Help

2002-02-08 Thread Rick Emery
You don't need to use var_dump. Just use the following statements: $newquery = mysql_query(SELECT * FROM local_shows WHERE show_date='$row[show_date]' AND venue='$row[venue]'); print $newquery; -Original Message- From: Jonathan Underfoot [mailto:[EMAIL PROTECTED]] Sent: Friday,

RE: [PHP-DB] multiple entries in database

2002-02-08 Thread Rick Emery
Show us you table data Show your PHP code as well -Original Message- From: Justin Hall [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 12:06 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] multiple entries in database I have worked my problem down to the mysql database. I have

RE: [PHP-DB] Dealing with Quotation marks

2002-02-08 Thread Rick Emery
First, you don't have to write your own function to remove slashes. Simply use: $newline = stripslashes($oldline); Second, write your lien containing slashes to the database. When you pull it from the database, use stripslashes(). -Original Message- From: Gary [mailto:[EMAIL

RE: [PHP-DB] Round a float to the next highest value despite the value after the point

2002-02-08 Thread Rick Emery
ceil($myvalue) -Original Message- From: Renaldo De Silva [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 1:32 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Round a float to the next highest value despite the value after the point how can I round a float to the next highest

RE: [PHP-DB] multiple query string

2002-02-08 Thread Rick Emery
cookies -Original Message- From: Renaldo De Silva [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 2:08 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] multiple query string Help! I'm designing a search page and I need to keep the search variable alive even after i refresh the

RE: [PHP-DB] multiple query string

2002-02-08 Thread Rick Emery
sessions -Original Message- From: Renaldo De Silva [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 2:10 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] multiple query string isn't there any other way? Rick Emery wrote: cookies -Original Message- From: Renaldo

RE: [PHP-DB] Query with numbers like 1, 3, 5..........

2002-02-07 Thread Rick Emery
Yes, but the question is why? -Original Message- From: Raymond Lilleodegard [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 1:22 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Query with numbers like 1, 3, 5.. Hi! Is there a way to get the rows with id's like 1, 3, 5,

RE: [PHP-DB] Can't get left join to work

2002-02-07 Thread Rick Emery
6902D 2002-03-01 5.00 6902D 2002-03-01 148.00 Q 2002-03-01 7.00 --- Rick Emery wrote ... Show us your table structures and the data they contain. It appears your WHERE clause probably acting correctly. But without data, we can determine

RE: [PHP-DB] duplicate entries in db

2002-02-07 Thread Rick Emery
Ya haven't given us much to go on. So... SELECT DISTINCT * FROM mytable WHERE some condition; -Original Message- From: Justin Hall [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 2:24 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] duplicate entries in db I have a script that

RE: [PHP-DB] Query with numbers like 1, 3, 5..........

2002-02-07 Thread Rick Emery
two datarows in one: do { } while (mysql_fetch_array() ); ?? or is this a stupid way to do it? Reagrds Raymond - Original Message - From: Rick Emery [EMAIL PROTECTED] To: 'Raymond Lilleodegard' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, February 07, 2002 8:55 PM Subject: RE

RE: [PHP-DB] Query with numbers like 1, 3, 5..........

2002-02-07 Thread Rick Emery
two datarows in one: do { } while (mysql_fetch_array() ); ?? or is this a stupid way to do it? Reagrds Raymond - Original Message - From: Rick Emery [EMAIL PROTECTED] To: 'Raymond Lilleodegard' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, February 07, 2002 8:55 PM Subject: RE

RE: [PHP-DB] Resource link errors

2002-02-07 Thread Rick Emery
The following means you have not opened a link to your database. Concerntrate your efforts there. Warning: Supplied argument is not a valid MySQL-Link resource in /var/www/html/list.php3 on line 26 -Original Message- From: Ken Thompson [mailto:[EMAIL PROTECTED]] Sent: Thursday,

RE: [PHP-DB] Need to delete charcters from a string

2002-02-07 Thread Rick Emery
$str = substr($str,0,-3); -Original Message- From: Renaldo De Silva [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 1:57 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP-DB] Need to delete charcters from a string I need to delete the last 3 character of a string,

RE: [PHP-DB] Updating Database problem...

2002-02-06 Thread Rick Emery
Jas, Why are you initiating an UPDATE command when you've not changed the information you wish to update? For instance, if $c_name is blank, you display a message to enter the data; yet, you DO NOT ASK the user to enter the correct information. Then, you do an UPDATE statment to enter that

RE: [PHP-DB] Is this possible?

2002-02-06 Thread Rick Emery
Yes, you can do that easily. It is easier to answer your question if you show us your table structure. -Original Message- From: Raymond Lilleodegard [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 11:16 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Is this possible? Hi! I

RE: [PHP-DB] Is this possible?

2002-02-06 Thread Rick Emery
Lilleødegård [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 11:33 AM To: Rick Emery; [EMAIL PROTECTED] Subject: Re: [PHP-DB] Is this possible? My table look like this: Pricetable: (varetabell) (varenr, type, pris) VALUES (1, '6inch', 29), (1, '6inch meny', 51

RE: [PHP-DB] Search results

2002-02-06 Thread Rick Emery
CHANGE: ? if ($Industry != ) { echo $msg; } else { echo $contact_list; } ? TO: if( mysql_num_rows($result) 0 ) { echo $contact_list; } else { echo $msg; } -Original Message- From: Todd Williamsen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 12:17 PM To: [EMAIL

RE: [PHP-DB] Re: Simple Search Function

2002-02-06 Thread Rick Emery
Mike is using MYSQL's REGEX; he's looking for a case-insensitive MYSQL function function similar to PHP's eregi(). -Original Message- From: Lerp [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 1:26 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: Simple Search Function Hi

RE: [PHP-DB] query from two tables

2002-02-04 Thread Rick Emery
Since you gave no real details of your table structure, I'll conjecture. Assume city table and advert table is defined as: CREATE TABLE city ( city_id int not null, auto_increment, city_name varchar(50) default ) CREATE TABLE adverts ( ad_id int not null auto_increment, ad_text varchar(200)

  1   2   3   >