RE: [PHP-DB] Error creating new table

2002-04-08 Thread Rick Emery
The problem is that he assigned a length to a TEXT field. You cannot do that. -Original Message- From: George Pitcher [mailto:[EMAIL PROTECTED]] Sent: Monday, April 08, 2002 3:13 AM To: [EMAIL PROTECTED]; Lisi Subject: Re: [PHP-DB] Error creating new table You can't have NOT NULL assig

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 bet

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.

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: "; $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 select box... O

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 exa

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

2002-04-05 Thread Rick Emery
ailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 9:29 AM To: Rick Emery; [EMAIL PROTECTED] Subject: RE: [PHP-DB] Insert, Arrays, & Null The data being read dynamically into the array could contain values which are NULL (the default) or numeric (if a numeric value exits). However, the query i

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

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

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, 20

[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:2

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 t

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: [PHP-

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

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: '[EMA

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 e

RE: [PHP-DB] Submitting Dynamic Form

2002-04-04 Thread Rick Emery
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

[PHP-DB] RE: help sorting by a column name

2002-04-03 Thread Rick Emery
il 03, 2002 4:37 PM To: Rick Emery Subject: Re: help sorting by a column name Oh thats teh statement that gets the number for this statement: while ($info = mysql_fetch_row($max)) { printf ("Hardware Reviews - %s Articles Total", $info["0"]); } and prints the total number of a

RE: [PHP-DB] sorting by colum name with nested loops

2002-04-03 Thread Rick Emery
you just cross-posted this to the mysql mailing list. is this a mysql issue or PHP issue? -Original Message- From: Alex Behrens [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 4:33 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] sorting by colum name with nested loops Hey Guys,

RE: [PHP-DB] Submitting Dynamic Form

2002-04-03 Thread Rick Emery
) construct to extract each key and value. So then you just walk through the array and process each entry. -Original Message- From: Chris MacKenzie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 8:47 AM To: Rick Emery Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Submitting Dynamic

RE: [PHP-DB] Submitting Dynamic Form

2002-04-03 Thread Rick Emery
what happened when you extracted the form field names from the DB? -Original Message- From: Chris MacKenzie [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 03, 2002 3:13 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Submitting Dynamic Form Hi All, I'm pretty new to the whole php thing a

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 n

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 increment

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] S

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 possib

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 wan

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 doesn't

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

2002-03-27 Thread Rick Emery
did you start each include file with: 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 some time

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 typ

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] Sub

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 in

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 in

RE: [PHP-DB] delete statement question

2002-03-25 Thread Rick Emery
? thanks for the help so far, 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 que

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 ('$C

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 O

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] 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 yo

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

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

2002-03-22 Thread Rick Emery
tables already, users 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:

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 use

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 Third: what error do you get when you get the parsing error? -Original Messa

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: Mort

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] 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] 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 unsubs

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] 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

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] 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 add

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: Wednes

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 jo

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 m

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] 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] 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 LIMIT.

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] 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, 2

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 displa

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

2002-02-18 Thread Rick Emery
ent is not a valid MySQL result 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: "&

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

2002-02-18 Thread Rick Emery
ng else which is obvious? George - Original Message ----- From: "Rick Emery" <[EMAIL PROTECTED]> To: "'George Pitcher'" <[EMAIL PROTECTED]>; "Rick Emery" <[EMAIL PROTECTED]>; "Greg Donald" <[EMAIL PROTECTED]>; <[EMAIL

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

2002-02-18 Thread Rick Emery
nt: Monday, February 18, 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 g

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] formatting w/ table

2002-02-15 Thread Rick Emery
Further, I recommend replacing your echos with the following: echo "Type Of Car: "". $myrow['car_type']."\n"; echo "Model Of Car: ". $myrow['car_model']."\n"; echo "Year Of Car: ". $myrow['car_year']."\n"; echo "Price Of Car: $". $myrow['car_price'."\n"; echo "VIN Of Car: ". $myrow['car_vin']

RE: [PHP-DB] formating w/ table

2002-02-15 Thread Rick Emery
Your 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 w/ tab

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] Deleting from a select list ? :-(

2002-02-14 Thread Rick Emery
Dave, First, you need a "SELECT" tags. print ""; $deloptions_sql = "select * from $tbn2"; $delresult = mysql_query($deloptions_sql, $con) or die("error:".mysql_error()); while ($listdelrows = mysql_fetch_array($delresult) ){ $name2 = $listdelrows[name]; $id2 = $listdelrows[id]

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 cau

RE: [PHP-DB] Time Question

2002-02-14 Thread Rick Emery
CORRECTION: -- 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. Got a bit of a snag. I'm migrating an ASP app to P

RE: [PHP-DB] Time Question

2002-02-14 Thread Rick Emery
-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 mssql7.0 backend. The snag is this, I have a 'starttime' field

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 a

RE: [PHP-DB] undeclared variable error

2002-02-13 Thread Rick Emery
change: to: 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, That took care of the $submit error, but I

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]] Sent:

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

2002-02-13 Thread Rick Emery
try: "> 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] Passing form values with quotes, to itself Hi there. I hav

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 so

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 La

RE: [PHP-DB] Need help (displaying select data from an array)

2002-02-13 Thread Rick Emery
session_start() does not take a parameter. Use: session_start(); session_register($clothes); -Original Message- From: Renaldo De Silva [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 13, 2002 8:16 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Need help (displaying select data from an

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] 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 fo

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] 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 P

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, Feb

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("$row[0]\n"); -Original Message- From

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)? W

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 Messa

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] 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 valu

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 PROTECTED]

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] 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, Febru

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

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] 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 atual

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 las

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

2002-02-08 Thread Rick Emery
ist from DuBoise, Zawodny, and others. -Original Message- From: paul wilczynski [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

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- Fr

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, February

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

2002-02-07 Thread Rick Emery
a database >into a "menu page". And I would like to have two products beside eachothers. >So... is it possible to get two datarows in one: > >do { > >} while (mysql_fetch_array() ); > >?? or is this a stupid way to do it? > >Reagrds Raymond >- Ori

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

2002-02-07 Thread Rick Emery
. So... is it possible to get 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]>

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 ; -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 calls a functi

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, w

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

2002-02-07 Thread Rick Emery
40.00 6902D 2002-03-0144.00 6902D 2002-03-0144.00 6902D 2002-03-01 800.00 6902D 2002-03-01 5.00 99996902D 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

  1   2   3   4   >