Tagged: syntax


PHP parse_str

Quick example of how to use PHP’s parse_str command. Here is an example of my data: $source = “access_token=CAAWhyYsjaWsBAOCwjZCs&expires=5180531”; What I’m trying to do is just grab the string of the access_token variable from...


SQL Case Statement Example

Basic syntax for using case when statements in SQL. For this example we want the following: If Field1 = 2 and Field2 = 2 then use the date in Field3 else use ‘1/1/3000’. Here...


SQL Syntax for Summing an Alias and Grouping by ID

Simple SQL query to sum an alias column and group by ID. Initial query user needed help with: select dt.member_id, dt.NumberOfMonthsBetween FROM ( select member_id, DATEDIFF(month,date_credentialed,renewal_date) as NumberOfMonthsBetween from member_credential ) dt where dt.NumberOfMonthsBetween...