I have a project coming up that will (eventually) require my ASP (3.0) scripts to make calls to custom DLLs. For the time being we need to create the necessary "hooks" so in the future the DLLs can just read these hooks and get the necessary data with little stress.
My questions:
1. What...
I have a basic query that returns x rows. However, when I loop through the result, the first record is always ignored from the resultset. Eh?
This is what I am doing to call the database and loop through the results.
$report = mysql_query("Select this FROM that", $link);
$cnt =...
UPDATE
I'm getting the proper return of values here, but if any event has more than 1 teacher associated, it displays it multiple times (n teachers = n displays).
SELECT DISTINCT mos_events.*, teacher.name FROM mos_categories AS b, mos_events
LEFT JOIN mos_events_users AS user ON...
This query was returning all events based on the following parameters. An additional condition was required, and that was to retrieve all teachers based on the event.
Now, some events may not have teachers, but my added SQL clause doesn't return events if no teachers are associated to it.
Old...
I have an array with n nested arrays in it. Example:
// Array's name is $detevent, with 2 nested arrays;
array(2) {
[0]=>
object(stdClass)(3) {
["id"]=>
string(1) "4"
["sid"]=>
string(1) "0"
["catid"]=>
string(2) "67"
}
[1]=>
object(stdClass)(3) {
["id"]=>...
Here is the query (some fields retrieved multiple times for date comparison purposes)
SELECT TIME_FORMAT(events.publish_up, '%l:%i %p') as starttime,
DATE_FORMAT(events.publish_up, '%M %D') as startdate,
DATE_FORMAT(events.publish_up, '%Y') as startyear,
DATE_FORMAT(events.publish_up, '%m-%d')...
I'm having trouble coming up with a WHERE condition for a query that returns all events based on user. I only want dates to appear that are less than 30 days minus the current date.
I'm running mySQL 4.0.24.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.