Avatar of breeze351
breeze351

asked on 

Php. Another set of eyes

I'm having a really bad day!!!!

I can't see the problem with this code:

$SqlString = "Select * from space_survey WHERE SEQ = '$Building_Id' and STOREKEY = '$Space_Id'";
echo "Q = ".$SqlString."<br>";
$Survey_Data = mysql_query($SqlString,$conn);
$ROW = mysql_fetch_assoc($Survey_Data, MYSQL_BOTH);

It returns:
Q = Select * from space_survey WHERE SEQ = 'NY1046000001' and STOREKEY = '1002'
Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /home/langsyst/public_html/lansco/Comp_Space.php on line 17
PHP

Avatar of undefined
Last Comment
Ray Paseur
ASKER CERTIFIED SOLUTION
Avatar of Kim Walker
Kim Walker
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of breeze351
breeze351

ASKER

This is what happens when "ASSHOLE PARTNER" renames table "space_survey" to "survey_data"!!!
Thanks
Glenn
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

There are predictable ways to find and visualize the MySQL errors, and you might want to use them in every place that you run a query.  You can make this very elaborate, but that is not usually necessary, and a simple and effective approach is shown in this article.  And you need the article anyway - MySQL is going away and you will need to convert your scripts to MySQLi or PDO.
https://www.experts-exchange.com/articles/11177/PHP-MySQL-Deprecated-as-of-PHP-5-5-0.html
PHP
PHP

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.

125K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo