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
/*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
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
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
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
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
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,
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
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
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
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
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
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
/*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
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
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
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?
>>
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
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
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
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
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
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=
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
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
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
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
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
#x27;, '$sclAddress', '$sclCity',
'$sclState', '$sclZip', '$stoName', '$stoCity', '$stoState')";
mysql_query($queryUnknown, $connection) or die("Query failed: ".
mysql_error($connection));
}
===
, schZip,
strName, strCity, strState) VALUES('$regName', '$regAddress', '$regCity',
'$regState', '$regZip', '$regPhone', '$sclName', '$sclAddress', '$sclCity',
'$sclState', '$sclZip',
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
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
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
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
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
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
36 matches
Mail list logo