hc Posted September 19, 2006 Share Posted September 19, 2006 I am in a bit of a bind, and am hoping someone would take a few minutes to explain this syntax. Basically, I responded to an ad and got hired. They said they needed an MS Access, ASP Programmer, and this is what I got handed to work on. So, I just want to know what this syntax is, particluarly the bolded parts. Any help would be appreciated. I understand that it returns an array of values, but what do the <<< and -> mean?? Thanks...I know this is simple stuff function GetEmployers() { $retval = false; $sqlstr = [b]<<<[/b] SQL SELECT emp.id, emp.employer, sport.id AS job_type_id, sport.name AS jobtype FROM businesses.employers AS emp LEFT JOIN master.sports AS sport ON sport.id = emp.sport_id WHERE emp.status_id = 1 ORDER BY emp.employerSQL; if([b]$this->Load[/b]($sqlstr)) { while($row = $this->db->fetch()) { $retval[] = $row; } } return $retval; } // GetEmployers() Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 19, 2006 Share Posted September 19, 2006 That a function with a sql class thats it. Quote Link to comment Share on other sites More sharing options...
hc Posted September 19, 2006 Author Share Posted September 19, 2006 yea, I know that, but what do the <<< and the ->mean?? Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 19, 2006 Share Posted September 19, 2006 http://uk.php.net/manual/en/language.oop5.basic.phpread ok. Quote Link to comment Share on other sites More sharing options...
trq Posted September 19, 2006 Share Posted September 19, 2006 The -> is php equivelent of asp's . If youve worked with objects in asp then its exactly the same. Instead of...[code]if rs.eof then[/code]php would be...[code]if ($rs->eof) {[/code] Quote Link to comment Share on other sites More sharing options...
hc Posted September 19, 2006 Author Share Posted September 19, 2006 thank you. Thats all I needed. I have been using ASP and .NET for years, and just got this thrown on me. I just needed a quick crash course. I appreciate the help. Thanks Quote Link to comment Share on other sites More sharing options...
redarrow Posted September 19, 2006 Share Posted September 19, 2006 [code]<?phpfunction db(){ $query = " SELECT emp.id,emp.employer,sport.id AS job_type_id,sport.name AS jobtype FROM businesses.employers AS emp LEFT JOINmaster.sports AS sport ON sport.id = emp.sport_id WHERE emp.status_id = 1 ORDER BY emp.employer";$result=mysql_query($query);while($row = mysql_fetch($result) ) { $retval[] = $row; } } return $db; ?> [/code] Quote Link to comment Share on other sites More sharing options...
hc Posted September 19, 2006 Author Share Posted September 19, 2006 thanks again, appreciated.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.