php


Having Trouble in PHP debugging


I'm new to PHP.
Now I'm trying to fix PHP source other one already have worked.
I succeeded to connect it with mysql using PEAR.
I'm on running it on my local, with MAMP and installed XDebug as well.
Here's the problem.
$select_query = " SELECT SEQ FROM TB_VISITOR WHERE VISITOR_NAME = '$visitor_name' AND VISITOR_PHONE_NO = '$visitor_phone_no' ";
$result =& $db->query($select_query);
if( PEAR::isError($result) )
{
$result_message['result'] = false;
$result_message['error_message'] = 'Search Fail';
}else
{
if( $result->fetchInto($row) )
{
$visitor_seq = $row[0];
}
}
I think that I'm blocked here, and want to know further what the problem was. What I want to see could be expressed in JQuery as 'console.log($result);
so I tried echo, echo $result > Never worked.
Of course, console.log never worked on PHP :'(
and with XDebug I tried like
phpinfo();
I got error message ? on PHP logs
phpinfo() expects parameter 1 to be integer, object given in /Applications/MAMP/htdocs/smartvisiting/visitor_enrollment_proc.php on line 54
so again tried phpinfo($result);
nothing happened.
Please let me know how I can see of 'result' in anyway.
I'm on using Chrome dev mode, Atom as editor tool, and running PHP through MAMP.
$select_query = " SELECT SEQ FROM TB_VISITOR WHERE VISITOR_NAME = '$visitor_name' AND VISITOR_PHONE_NO = '$visitor_phone_no' ";
$result = $db->query($select_query);
if (mysql_errno())
{
echo mysql_error();
}
else
{
if( $result->fetchInto($row) )
{
$visitor_seq = $row[0];
}
}

Related Links

Using “auto_prepend_file” into “.user.ini” file in PHP
Store real line break in db
isset function is not taking variable passed from other page
redirect page during execute long query
How to change the default character set for the database connection?
Compile PHP into Static Binary
getting a total count arrays of a multi-dimentional array
how to add active class on menu in codeigniter
PHP: Fill combobox after choosing one option from another combobox using MySQL database
Attachment not sent with Email
PHP-MySQLi not returning error when using a CALL and a SELECT result was returned before the error
Extending a Doctrine entity to add extra association mapping in Symfony2
set cookie values dynamically for incoming user in ecommerce site
How to add unique suffix for wordwrap() in PHP?
PHP/Jquery -> Plugin: DataTables, how to use the formatter in an array?
How to count multiple string value in a same column with sum values in adjacent column

Categories

HOME
matrix
generics
yahoo-weather-api
paypal-ipn
workflow
google-play-services
yql
google-webmaster-tools
liferay-7
stored-procedures
firebase-database
port
stack-overflow
heuristics
nexus3
buffer
sonata
c#-7.0
scala-ide
maven-surefire-plugin
uislider
vuforia
jpa-2.1
window-managers
history.js
sfml
ninject
locks
dotcms
steam-web-api
mongoengine
advanced-filter
autoencoder
wdk
assertions
pdfnet
ftp-server
runtimeexception
forms-authentication
google-now
utf
suds
opal-framework
raytracing
contactless-smartcard
code-push
linq-to-excel
common-table-expression
rm
sharpdx
maven-jaxb2-plugin
word-2007
patternlab.io
test-data
connect-direct
ltrace
ternary-operator
java-2d
xmlbeans
mathjs
clp
system.net.mail
seccomp
oci
apache-pig-grunt
node-glob
persistent-object-store
teamviewer
openmrs
gluon-desktop
relational-model
web-api
famo.us
wicket-1.5
lumia-imaging-sdk
siena
code-complexity
wso2bam
roxy-fileman
typesafe-stack
lsa
delphi-xe4
reentrancy
spark-view-engine
drawimage
filelock
nosetests
azure-acs
simile
django-pagination
eaccelerator
html-components
ppc
wmd-editor
ntruencrypt
synthesizer

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App