mysql - syntax error or access violation 1064 php pdo -


$stmt = $dbh->prepare("select menulist_tbl menulist_id=:menuid");         $stmt->bindvalue(':menuid',$menuid,pdo::param_str);         $stmt->execute();         $selected_row = $stmt->fetch(pdo::fetch_assoc); 

i have select statement syntax error or access violation 1064 in line 471 line $stmt->execute(); cant see error because using same statement before dont error wondering why now

you need specify selecting have not. if need select columns

select * table_name 

if need select specific columns then

select col1,col2  table_name 

in case may have as

select * menulist_tbl menulist_id=:menuid 

or if want specific columns selected instead of *


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -