Jump to content
Larry Ullman's Book Forums

Search the Community

Showing results for tags 'empty'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Single Editions
    • Modern Javascript: Develop and Design
    • The Yii Book
    • Effortless Flex 4 Development
    • Building a Web Site with Ajax: Visual QuickProject
    • Ruby: Visual QuickStart Guide
    • C++ Programming: Visual QuickStart Guide
    • C Programming: Visual QuickStart Guide
    • Adobe AIR: Visual QuickPro Guide
  • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (5th Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (4th Edition)
    • PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (2nd Edition)
    • PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide (1st Edition)
  • PHP for the Web: Visual QuickStart Guide
    • PHP for the Web: Visual QuickStart Guide (5th Edition)
    • PHP for the Web: Visual QuickStart Guide (4th Edition)
    • PHP for the Web: Visual QuickStart Guide (3rd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (2nd Edition)
    • PHP for the World Wide Web: Visual QuickStart Guide (1st Edition)
  • Effortless E-commerce with PHP and MySQL
    • Effortless E-Commerce with PHP and MySQL (2nd Edition)
    • Effortless E-Commerce with PHP and MySQL
  • PHP Advanced: Visual QuickPro Guide
    • PHP Advanced and Object-Oriented Programming: Visual QuickPro Guide (3rd Edition)
    • PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)
    • PHP Advanced: Visual QuickPro Guide
  • MySQL: Visual QuickStart Guide
    • MySQL: Visual QuickStart Guide (2nd Edition)
    • MySQL: Visual QuickStart Guide (1st Edition)
  • Other
    • Announcements
    • Newsletter, Blog, and Other Topics
    • Forum Issues
    • Social

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 1 result

  1. Never mind. I figured it out. The parameters are overwritten by the Select. Can you see what is wrong with this Select. I know the variables are set and I know there is no data, the $islocked and $addr are both blank. I only fetch address to see if I can get any data. I did this from phpmyadmin and it retrieved locked=1 function failed($dbc, $em, $ad, $TheTable) { $islock=0; $addr=""; $stmt = mysqli_prepare($dbc, 'SELECT locked, address FROM $TheTable WHERE (email=? OR address=?) LIMIT 1'); mysqli_stmt_bind_param($stmt, "ss", $em, $ad); mysqli_stmt_execute($stmt) or trigger_error("Query: $q\n<br />MySQL Error: " . mysqli_error($dbc)); mysqli_stmt_bind_result($stmt, $islocked, $addr); mysqli_stmt_fetch($stmt); if ($islocked > 0) { mysqli_stmt_close($stmt); return (true); } mysqli_stmt_close($stmt); return (false); } // End of function. And this is the table CREATE TABLE IF NOT EXISTS `B_Distributors` ( `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'db increments', `email` varchar(80) COLLATE utf8_unicode_ci NOT NULL, `address` varchar(80) COLLATE utf8_unicode_ci DEFAULT NULL, `locked` tinyint(1) unsigned DEFAULT NULL COMMENT 'I forbid', `notes` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `orig_date` datetime DEFAULT NULL, `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=2 ; -- -- Dumping data for table `B_Distributors` -- INSERT INTO `B_Distributors` (`id`, `email`, `address`, `locked`, `notes`, `orig_date`, `time_stamp`) VALUES (1, 'bca@rr.com', '71st Street', 1, '', '2015-07-11 11:43:41', '2015-07-11 15:43:41');
×
×
  • Create New...