Re: [PHP-DB] Mysql result resource error

2001-12-20 Thread Jim Lucas
which one was giving you the problem? the first or second mysql try. if it was the second, try wrapping the $cattyname with single quotes like this Minor_Category = '$cattyname'. if the $cattyname var has anything but numbers, the statement won't work. Jim - Original Message - From: "S

Re: [PHP-DB] Checkboxes, PHP, and MySQL

2001-12-20 Thread Jim Lucas
Try this > Jim - Original Message - From: "SpyProductions Support Team" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 20, 2001 8:40 AM Subject: [PHP-DB] Checkboxes, PHP, and MySQL > > I've looked around in a few of the PHP lists for an answer to this, but > can't

Re: [PHP-DB] MySQL date formats

2001-12-20 Thread Jim Lucas
in your select statement that you pull the date out with. wrap that column with SELECT UNIX_TIMESTAMP() FROM table; this will return the unix timestamp now with this format use the date() function and format the date how ever you would like. Jim - Original Message - From: "Rosser, Chr

[PHP-DB] Re: [PHP] Re: the opposite of a join?

2007-10-03 Thread Jim Lucas
regards to similarly formed SQL calls, I would like to hear their experiences. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William Shakespeare -- PHP Databas

[PHP-DB] Re: [PHP] Re: the opposite of a join?

2007-10-03 Thread Jim Lucas
Robert Cummings wrote: On Wed, 2007-10-03 at 14:49 -0700, Jim Lucas wrote: This is only from my own personal testing. Mind you that I have only been using PostgreSQL for a year or so. But one problem that I have always ran into with MySQL is that when JOIN'ing tables that have large

[PHP-DB] Re: [PHP] Sample script files with 3 different select boxes with mysql conditions in select boxes

2008-01-03 Thread Jim Lucas
ta via AJAX or a predefined JS hash, but then when JS was disabled, it would be best if it fell back to old school and submitted the form when I select the lang->auth->book. Thanks -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some hav

[PHP-DB] Re: [PHP] goto - My comments

2010-12-21 Thread Jim Lucas
On 12/18/2010 9:17 PM, Ethan Rosenberg wrote: Dear List - Thanks to all for your EXCELLENT comments. I definitly agree that goto is a command to be avoided at all costs. In this case, I could not figure out how to acheive the desired result without the goto. So being a newbie, I humbly reque

[PHP-DB] Re: [PHP] Regex for telephone numbers

2010-12-31 Thread Jim Lucas
trim($number))) > { > return true; > } > > return false; > } > ?> > > Actually... Specified here [1] it says that the {1,} is the same as '+'. I think you should drop the comma. If you don't this would be valid 844-2345-123456 ^[2-9]{1,}[0-9]{2,}\-[2-9]{1,}[0-9]{2,}\-[0-9]{4,}$ should be ^[2-9]{1}[0-9]{2}\-[2-9]{1}[0-9]{2}\-[0-9]{4}$ 1 http://us.php.net/manual/en/regexp.reference.repetition.php Jim Lucas -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] array-problems

2001-10-24 Thread Jim Lucas
- Original Message - From: "Jim Lucas" <[EMAIL PROTECTED]> To: "Bart Verbeek" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, October 24, 2001 12:42 PM Subject: Re: [PHP-DB] array-problems > Try this: > > <<< BEGIN:PHP-C

Re: [PHP-DB] New users on mysql using php

2001-10-25 Thread Jim Lucas
go grab yourself a copy of phpmyadmin http://phpmyadmin.sourceforge.net/download.html jim - Original Message - From: "Harpreet" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 25, 2001 2:02 PM Subject: [PHP-DB] New users on mysql using php > I connect to mysql data

Re: [PHP-DB] Learning PHP Sessions

2001-10-31 Thread Jim Lucas
one problem I see, you are trying to populate the variable after you register it. session_start(); $myvar = "something"; session_register('myvar'); echo $myvar; Jim Lucas - Original Message - From: "Russ Michell" <[EMAIL PROTECTED]> To: &q

Re: [PHP-DB] Passing parameter in Paging

2001-12-28 Thread Jim Lucas [php]
better yet, have a starting page multiplied by the page length define a constant that gives the page limit then have the receiving page do some math and do a mysql_data_seek() or array_seek() (which ever you are using) and then limit the returns by the page limit size? wouldn't that be the easie

Re: [PHP-DB] # of Records in Table

2002-01-23 Thread Jim Lucas [php]
does the table have an autoincrement column? Jim Lucas - Original Message - From: "Zach Curtis" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 23, 2002 10:27 AM Subject: [PHP-DB] # of Records in Table > What syntax can I use to determine

Re: [PHP-DB] Select rows where ?

2002-02-12 Thread Jim Lucas [php]
select * from table where column<>"something" select * from table where column NOT LIKE "%something%" Jim Lucas - Original Message - From: "Dave Carrera" <[EMAIL PROTECTED]> To: "php List" <[EMAIL PROTECTED]> Sent: Tuesday, Febr

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

2002-02-13 Thread Jim Lucas [php]
Try this. That should to the job. Jim Lucas - Original Message - From: "Faye Keesic" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 13, 2002 10:02 AM Subject: [PHP-DB] Passing form values with quotes, to itself > Hi there. > &

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

2002-02-13 Thread Jim Lucas [php]
it will still cut off with the double quots. if you have a double quote inside of a double quoted value property This will still break. it does care if they are escaped. Jim Lucas - Original Message - From: "David Fudge" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTE

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

2002-02-14 Thread Jim Lucas [php]
it is called magic quotes and it can be enabled through the php.ini file. Jim Lucas - Original Message - From: "William Fong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 13, 2002 10:36 AM Subject: Re: [PHP-DB] Passing form values

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

2002-02-14 Thread Jim Lucas [php]
instead of " = " you will concat the results, therefor making one long string. then echo/print the $display_srch_rows variable. Jim Lucas - Original Message - From: "Dave Carrera" <[EMAIL PROTECTED]> To: "php List" <[EMAIL PROTECTED]> Sent: Wednesd

Re: [PHP-DB] easy date format question

2002-03-01 Thread Jim Lucas [php]
$today = date("Ymd"); $sql = "INSERT into table (date) values ('$today')"; when the $today variable is inserted into a mysql date column it will fit just right. but, if you want to insert it into a timestamp column, you will have to padd it with 6 zero's Jim

Re: [PHP-DB] any php/Linux gurus out there?

2002-03-05 Thread Jim Lucas [php]
grade all the deps also. it will be worth it in the long run. Jim Lucas - Original Message - From: "Jason Wong" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 04, 2002 8:18 PM Subject: Re: [PHP-DB] any php/Linux gurus out there? > On Tuesday 05 Ma

Re: [PHP-DB] Multiple SELECT querys

2002-03-22 Thread Jim Lucas [php]
I will take this example and improve upon it, try this: $query = "SELECT myvalue FROM mytable WHERE some_condition"; $result = mysql_query($query) or die("Error: ".mysql_error()); $srch = array(); while( list($myvalue) = mysql_fetch_array($result) { $srch[] = $myvalue; } $query = "SELECT * FR