Re: [PHP] PHP MySQL Insert Syntax

2008-04-01 Thread kvigor
Thanks :-) <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Insert is for a new row > > Alter or Update is for an exsisting row > > > > > > /*I'm trying to insert values from an array into MySQL DB but the insert > begins at the last record in the table and not at first record in th

[PHP] PHP MySQL Insert Syntax

2008-04-01 Thread kvigor
/*I'm trying to insert values from an array into MySQL DB but the insert begins at the last record in the table and not at first record in the table. I have added the cellSuffixes column after I already populated 30 records in other columns*/ Code: foreach($list as $key=>$value) { $query = "IN

[PHP] Re: magic quotes

2007-07-31 Thread KVIGOR
Never Mind I figured it out. ""KVIGOR"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If magic quotes is on and I dont have access to the php.ini. > > Is there any way I can strip quotes from the form field with out using > AJAX

[PHP] magic quotes

2007-07-31 Thread KVIGOR
If magic quotes is on and I dont have access to the php.ini. Is there any way I can strip quotes from the form field with out using AJAX? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: If MySQL column/field values are in an PHP array

2007-07-19 Thread kvigor
I tried the MySQL forums but they are kinda slow responding. // ""M. Sokolewicz"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > kvigor wrote: >> I created an array using the

[PHP] If MySQL column/field values are in an PHP array

2007-07-19 Thread kvigor
I created an array using the following: $in_list = "'".join("','",$cen_chiefs)."'"; //$cen_chiefs is an array $query_cen_chiefs = "SELECT * FROM central WHERE CONCAT(strName,' ',strCity,' ',strState) IN({$in_list})"; How would I go about adding an AND clause to the above query to return all ro

Re: [PHP] Selecting Rows Based on Row Values Being in Array

2007-07-17 Thread kvigor
ral WHERE CONCAT(strName,' ',strCity,' ',strState) IN({$in_list}) AND WHERE (strName) IN({$in_list}) ORDER BY conName"; Any suggestions? "Jim Lucas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > kvigor wrote: >> Hello All,

Re: [PHP] Selecting Rows Based on Row Values Being in Array

2007-07-17 Thread kvigor
trCity,' ',strState) IN({$in_list}) AND WHERE (strName) IN({$in_list}) ORDER BY conName"; Any suggestions? "Jim Lucas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > K. Hayes wrote: >> Will do. Thanks. >> >> >> - Ori

Re: [PHP] Checking Post Data against DB Data

2007-07-17 Thread kvigor
I really like the re-coding it's great. I'm still new and below code is definitely more efficient. FYI: I do have date field sorry I wasn't so clear. I just didn't post all code. ""Richard Lynch"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Doing a select to get every recor

Re: [PHP] Array Question

2007-07-17 Thread kvigor
Thanks for all the input. You've all been pretty informative. Sorry of delayed response to help but was busy. You all are appreciated. "Stut" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Richard Lynch wrote: >> On Wed, July 11, 2007 4:16 pm, Robert Cummings wrote: But I

Re: [PHP] Array Question

2007-07-11 Thread kvigor
Thanks, I've seen the light by your code. ""Robin Vickery"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 11/07/07, kvigor <[EMAIL PROTECTED]> wrote: >> Is there a php function similar to in_array that can detect if a "parti

Re: [PHP] Checking Post Data against DB Data

2007-07-11 Thread kvigor
OK Chris, I understand that we're checking checking the form data and escaping it, but can explain what's going on in the WHERE clause and 1=1 tad bit more. "Chris" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > kvigor wrote: >> /*Good M

[PHP] Array Question

2007-07-10 Thread kvigor
Is there a php function similar to in_array that can detect if a "partial value" is in an array value or not: e.g. $var1 = " big horse";$var2 = " small yellow";$var3 = " red hydrant"; $theArray = array(big blue horse, small yellow bird, giant red hydrant); Is there a way to find out if

[PHP] Checking Post Data against DB Data

2007-07-10 Thread kvigor
/*Good Morning to All, I am having an issue with the following code. I'm trying to match $newRegistrant(which is concatenated form data) with $oldRegistrant(which is concatenated DB data). The code is suppose to check if the Registrants match, if they do, then check if last registration was l

[PHP] Re: Reading Error: socket '/var/lib/mysql/mysql.sock'

2007-07-06 Thread kvigor
PROBLEM SOLVED had wrong db connection file on HOST SERVER. ""kvigor"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Can't connect to local MySQL server through socket > '/var/lib/mysql/mysql.sock' (2) > > FYI I did t

[PHP] Reading Error: socket '/var/lib/mysql/mysql.sock'

2007-07-06 Thread kvigor
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) FYI I did this to solved the problem but it didn't work: http://webyog.com/forums/lofiversion/index.php/t1367.html the only thing is that I'm running MySQL 5.0 (I have a my.ini not my.cfg) and I put the var fol

Re: [PHP] Selecting Rows Based on Row Values Being in Array

2007-07-05 Thread kvigor
e concatenated value will be 8purple60lbs, shouldn't MySQL return that row? Thanks for your patience. "Jim Lucas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > kvigor wrote: >>>> where is the part that it join()'s things together? >>

Re: [PHP] Selecting Rows Based on Row Values Being in Array

2007-07-04 Thread kvigor
lbs 8 purple 60lbsHope all this helps === "Jim Lucas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > kvigor wrote: >> Jim, >> >> Thanks for all you help. Tell me where to mail

Re: [PHP] Selecting Rows Based on Row Values Being in Array

2007-07-03 Thread kvigor
MySQL errors either. So I'm wondering why aren't rows returning? //END DETAILS== "Jim Lucas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > kvigor wrote: >> Ok Jim, >> >&g

Re: [PHP] Removing Spaces from Array Values

2007-07-02 Thread kvigor
I meant to say: Got It, My bad, I really feel SHEEPISH... should have done... This is what happens when you're trying to code with a migraine, You start speaking another language. Thanks Again ""kvigor"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTE

Re: [PHP] Selecting Rows Based on Row Values Being in Array

2007-07-02 Thread kvigor
rom the query: Query failed: Unknown column '6blue40lbs' in 'where clause'// where am I going wrong? == "Jim Lucas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > kvi

Re: [PHP] Removing Spaces from Array Values

2007-07-02 Thread kvigor
NOT change the parameter. Rather, > str_replace() returns the desired string. Try changing your code to: > > > for($num = 0; $cntr < $num; $cntr++) > { > $someArray[$num] = str_replace(' ','',$someArray[$num]); > echo "$someArray[$num]"; > } > &g

[PHP] Removing Spaces from Array Values

2007-07-02 Thread kvigor
Need to remove all spaces from Array Values... And this doesn't work. This is similar info that's within array values: $someArray[0] = "PHP is awesome";s/b PHPisawesome This is similar info that's within array values: $someArray[1] = "The Toy Boat";s/b TheToyBoat Begin Code=

Re: [PHP] Selecting Rows Based on Row Values Being in Array

2007-07-01 Thread kvigor
ng from them Where do I give the name to the string? So this is where I am so far: $sql = "SELECT* FROM table WHERE CONCAT(size,color,weight) IN( )"; "Jim Lucas" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > K. Hayes wrote: >> Will do. Thanks

[PHP] Selecting Rows Based on Row Values Being in Array

2007-06-29 Thread kvigor
Hello All, I'm attempting to return rows from a mysql DB based on this criteria: I have a list, in the form of an array that I need to compare against each row in the table. Where theres a match I need that entire row returned. e.g.$varListof 3outOf_10Fields = array(6blue40lbs, 7orange50lb

Re: [PHP] Convert Date time into Seconds

2007-06-23 Thread kvigor
Cool, Like Ambien, It worked like a dream. "Robert Cummings" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Sat, 2007-06-23 at 21:29 -0500, kvigor wrote: >> Good Day, >> >> I'm chech if 24hrs has passed between these 2 date

[PHP] Convert Date time into Seconds

2007-06-23 Thread kvigor
Good Day, I'm chech if 24hrs has passed between these 2 datetimes: $dTime1 = 2007-06-21 11:08:09; $dTime2 = 2007-06-22 07:08:09; I'd really like to convert the datetimes above into a format I can do regular math them. Browsing around I've found the following code. But both weren't clear on

[PHP] Re: Not getting expected result from file()

2007-06-11 Thread kvigor
in message news:[EMAIL PROTECTED] > kvigor wrote: > >> Hello, >> >> I'm using the file function create an array. I'm using a value from a >> form to see if it matches in elements in the array. >> >> My problem is I expect the condition t

[PHP] Re: Not getting expected result from file()

2007-06-10 Thread kvigor
#x27;, '$sclAddress', '$sclCity', '$sclState', '$sclZip', '$stoName', '$stoCity', '$stoState')"; mysql_query($queryUnknown, $connection) or die("Query failed: ". mysql_error($connection)); } ===

[PHP] Re: Not getting expected result from file()

2007-06-10 Thread kvigor
, schZip, strName, strCity, strState) VALUES('$regName', '$regAddress', '$regCity', '$regState', '$regZip', '$regPhone', '$sclName', '$sclAddress', '$sclCity', '$sclState', '$sclZip',

[PHP] Re: Not getting expected result from file()

2007-06-10 Thread kvigor
Sorry I re-wrote for problem clarity. FYI whenever I do a var_dump it always shows $stringOne as being 2 characters less e.g. var_dump($foodlandPA[45]); var_dump($storeInfo); string(31) "Wellston Foodland Wellston OH " string(29) "Wellston Foodland Wellston OH" "&q

[PHP] Not getting expected result from file()

2007-06-10 Thread kvigor
Hello, I'm using the file function create an array. I'm using a value from a form to see if it matches in elements in the array. My problem is I expect the condition to be true but info but my DB isn't populated as I in the right DB... =Code Begins

Re: [PHP] Cant set info in DB...HELP

2007-06-03 Thread kvigor
Thanks All. Made the changes and just like Ambien it worked like a Dream. I found out that I had a typo in my DB and missing ")" I corrected it. All is well. "Tijnema" < wrote in message news:[EMAIL PROTECTED] > On 6/3/07, Stut <[EMAIL PROTECTED]> wrote: >> K. Hayes wrote: >> > What "lists" are

[PHP] Cant set info in DB...HELP

2007-06-01 Thread kvigor
Hello, I'm using phpMyAdmin and I can't get any of my form data into the database. It returns message: "MySQL returned an empty result set" w/in phpMyAdmin GUI. However I get no errors on screen when form info is submitted. What I have done to solve issue: drop DB and create new. Review form v

Re: [PHP] Form Validation Issues

2007-05-23 Thread kvigor
Thanks Dan, Work like a dream. I solute you. ""Daniel Brown"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On 5/23/07, kvigor <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> I have an issue with a particular if statement

[PHP] Form Validation Issues

2007-05-23 Thread kvigor
Hi, I have an issue with a particular if statement when I check 3 form fields for their value. The problem is no matter what input is entered in the fields the output is the same. I only added the 3 fields in question of the form to reduce heartache for the readers of this post. Output alway