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

PHP Time functions [duplicate]
Display a custom text on the Order Received Page just before order details
PHP/AJAX do php when custom field has valid input WooCommerce
How put Laravel site on shared hosting which has multiple other sites in subdirectories?
How to handle login in Laravel using a REST web service instead Laravel authentication mechanism?
Returning list of users someone is following (over 200)
SQL Slow connection, insert respect select
Laravel Elixir rev.manifest.json file not being updated
Is it possible to control data of another server using cpanel
How to set server datetime as tomorrow in a moment
How do you dynamically insert parameters into a mySQL database with php?
How to add categories to category and subcategory page on WooCommerce - Wordpress
php simpleXml iteration stops moving to the next element
Warning: Illegal string offset ‘content’
Laravel 5.3 Reflection error even Controller exists
How to style recaptcha2?

Categories

HOME
matrix
xcode
seedstack
couchdb
biztalk
amp
ontology
fedora
ag-grid
mithril.js
static-analysis
swarm
solution
buffer
mailmerge
grocery-crud
multi-step
async-await
varnish-vcl
http-authentication
spyder
bosun
sharedpreferences
maven-surefire-plugin
uislider
fluent-migrator
animated-gif
dragula
jstree
data-collection
offline-caching
network-analysis
gravity-forms-plugin
sfml
docx4j
guice
windows2012
mongodb-3.4
caesar-cipher
image-optimization
jfxtras
nppexec
microsoft-ui-automation
resampling
classnotfoundexception
angular-datatables
head.js
entropy
datediff
punctuation
watir-webdriver
gtk#
htmlspecialchars
ptvs
emf-compare
jsonix
ndk-build
mathjs
decoder
tsqlt
android-sdcard
piping
right-to-left
deferred-rendering
gnucash
sharepoint-apps
gravatar
currency-exchange-rates
ajax4jsf
bjam
auto-generate
pythonxy
bootstrap-wysiwyg
shoes
object-code
lmax
loginview
mousemotionlistener
django-facebook
acceptance-testing
asp.net-mvc-3-areas
significant-digits
handshake
gprof
jquery-dialog
story
telerik-ajax
kaazing
zotonic
netstream
startupscript
kernel32
suphp
formal-semantics
reliability
processors
external-sorting
iphone-sdk-3.1.3
server-load
parentid

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App