logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 02-17-2014, 09:30 AM   #1
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,176
Default going insane....!!!

im sick of looking at this, I cant see my mistake, i hope someone can Im missing something here

Code:
    $dbh = new PDO("mysql:host=$hostname;dbname=villainfo", $username, $password);

$sql = "UPDATE late SET late = :late,
            late_low = :late_low,
            late_high = :late_high, 
            late_peak = :late_peak, 
            over_14 = :over_14, 
			over_14_low = :over_14_low, 
			over_14_high = :over_14_high, 
			over_14_Peak = :over_14_Peak, 
			over_30 = :over_30, 
			over_30_low = :over_30_low, 
			over_30_high = :over_30_high, 
			over_14_Peak = :over_14_Peak, 
			tax = :tax 
            WHERE title = :title";
$stmt = $dbh->prepare($sql);   

	
$stmt->bindParam(':title', $_POST['title'], PDO::PARAM_STR);                                 
$stmt->bindParam(':late', $_POST['late'], PDO::PARAM_INT);      
$stmt->bindParam(':late_low', $_POST['late_low'], PDO::PARAM_STR);   
$stmt->bindParam(':late_high', $_POST['late_high'], PDO::PARAM_STR);
$stmt->bindParam(':late_peak', $_POST['  late_peak'], PDO::PARAM_STR);


$stmt->bindParam(':over_14', $_POST['over_14'], PDO::PARAM_INT);  
$stmt->bindParam(':over_14_low', $_POST['over_14_low'], PDO::PARAM_STR);
$stmt->bindParam(':over_14_high', $_POST['over_14_high'], PDO::PARAM_STR);
$stmt->bindParam(':over_14_Peak', $_POST['over_14_Peak'], PDO::PARAM_STR); 


$stmt->bindParam(': over_30', $_POST['over_30'], PDO::PARAM_INT);
$stmt->bindParam(':over_30_low', $_POST['over_30_low'], PDO::PARAM_STR);
$stmt->bindParam(':over_30_high ', $_POST['over_30_high'], PDO::PARAM_STR);
$stmt->bindParam(':over_14_Peak ', $_POST['over_14_Peak '], PDO::PARAM_STR); 
$stmt->bindParam(':tax', $_POST['tax'], PDO::PARAM_INT);
$stmt->execute();
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 02-19-2014, 02:14 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,176
Default

found it!!! my baad tiepin again, i left spaces in the bind value s

ver_14_Peak ',
ver_30_high '
this cost me a lot of nervous energy
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 02-19-2014, 08:47 AM   #3
d a v e
 
Join Date: Feb 2006
Location: finland
Posts: 1,684
Default

is there no php validator like an html or css one?
d a v e is offline   Reply With Quote
Old 02-19-2014, 09:28 AM   #4
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,176
Default

um yes pdo even has its own catch error system but i had got so blind i missed it. plus my ide picks up stuff like that but i was just looking at the wrong stuff.
eventually i coded it differently and it spotted the original error, now i just have to find a way to blame someone else for it
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:57 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com