php


bindValue error: Notice: Array to string conversion in C:\xampp\htdocs\eindwerk6\classes\User.php on line 362


I have been busy with a follow function. However, "Notice: Array to string conversion in C:\xampp\htdocs\eindwerk6\classes\User.php" on line 364 keeps popping up.
This is the relevant function in User.php:
public function checkFollow($mainID, $guest){
$conn = db::getInstance();
$statement = $conn -> prepare("SELECT COUNT(*) FROM followOthers WHERE followerID=:followerID AND followingID=:followingID");
$statement -> bindValue(':followerID', $mainID); //this is line 364
$statement -> bindValue(':followingID', $guest);
return $statement;
}
This is where I call to that function:
$check = $user->checkFollow($currentUser, $guest);
$countCheck = 0;
foreach ($check as $c){
$countCheck = 0;
}
This is where it's supposed to be used:
if($check->fetchColumn() == 1){
echo "<a class='btn btn-default' href='#'>Unfollow</a>";
}else{
echo "<a class='btn btn-default' href='#'>Follow</a>";
}

Related Links

How to parse raw E-Mail with Zend Framework 2?
jquery mobile navbar isn't going active
Saving Canvas image to mysql
Search form on same line as navigation (array) php
Why isn't this simple sign up page working?
php & cookies : last $articleid visited in an array
How to give duplication validation in PHP mysql?
MySQL query select DISTINCT but display all rows
jQuery,PHP-upload text file,doc/docx,ppt/pptx,pdf [closed]
Fill missing date and prices (such as weekend) in array
Fetch a POST request that a site is sending to itself?
How to extract conditional operators from the given string in php?
Posted Variable Not being Sent to Db - Codeigniter
Rewrite single page url in Wordpress with .htaccess
Cannot get autocomplete to work in CodeIgniter - thoughts?
PHP efficiency, to use loops or not? (improving an old project)

Categories

HOME
hpoo
matrix
typelite
openxml
couchdb
adobe
capistrano
mithril.js
cisco
clickable-image
yahoo
alljoyn
circleci
clish
asp.net-core-1.0
pinterest
pygobject
uima
jqxgrid
scala-ide
office-ui-fabric
xsl-fo
android-permissions
neo4j.rb
bosun
multi-upload
raima
clipboard
android-service
running-object-table
onchange
php-5.3
autodesk-model-derivative
vcenter
netbios
cucumber-junit
winrm
markov-chains
char-pointer
formsauthenticationticket
nanogallery
macports
ng-repeat
viewcontroller
word-cloud
optionaldataexception
fluid-mac-app-engine
asihttprequest
ssi
maven-jaxb2-plugin
mura
clrs
1010
prefetch
google-identity-toolkit
streamwriter
tablespace
jsonix
visual-studio-monaco
nvda
nsdata
wolfram-language
noclassdeffounderror
strpos
jeditable
accessibilityservice
django-validation
ui4j
fanotify
cfwheels
calcite
espresso
fantom
componentart
ampersand
erlog
subfolder
datagridcomboboxcolumn
wicket-1.5
aho-corasick
treeline
screwturn
hyperloglog
radius-protocol
iosched
ax
dynamic-rdlc-generation
html-frames
days
tfs-sdk
jquery-cycle
jquery-dialog
gamesalad
java.lang.class
nsfont
algol68
qt-mobility
mediacontroller
channelfactory
sscli
tabbarcontroller
self-tracking-entities
getimagesize
yahoo-maps
html-components
firephp
synthesizer

Resources

Encrypt Message