Jump to content


acctman

Member Since 28 Jul 2007
Offline Last Active Yesterday, 11:43 AM

Posts I've Made

In Topic: expects parameter 1 to be mysqli_result

Yesterday, 11:45 AM

$loadSession will contain either a valid result object or, if the query failed, the boolean value "false"

 

Your query failed - check the value given by $con->error

 

 

after re-reading your response I found the problem. I did not have the database in $con... the error checked worked.


In Topic: expects parameter 1 to be mysqli_result

Yesterday, 11:28 AM

$loadSession will contain either a valid result object or, if the query failed, the boolean value "false"

 

Your query failed - check the value given by $con->error

 

but I have

if (mysqli_num_rows($loadSession) == 0) {

to had if it's 0 (false). Am I missing something?


In Topic: Simple HTML Dom... get width value

18 January 2013 - 07:01 AM

According to the Sourceforge Code site:

$element = $html->find("font[size=-1]", 3);
echo "Width is: " . $element->width . '<br />';



I'm trying to check if there is and image after the <td> tag, and if there is grab the width value. the method i'm using below is not working

    $element = $html->find("td", 23);
    if ($element->innertext != null) {
        $element = $html->find("td img[src=http://pictures.domain.com/images/7.gif]");
        echo $element->width . '<br />';        
    } else {
       echo "empty";
    }

In Topic: Error in SQL syntax LEFT JOIN

09 May 2012 - 10:03 AM

I almost have the data I want... this is a bit tricky. (pic at bottom)

The query below returns all records with a status of Member-id5 but I need to filter that look up. if I did a simple query on ect. (exp_channel_titles) for author_id 323 I would get 5 results. Of those 5 results one has a status of 'Member-id5', another one has a status of 'complete' and title of %Member%. That's the deciding factor. If that row exist with status = complete and title = %Member% then its okay to grab the entry_id of row status = Member-id5 to use for looking up the data in ecd (exp_channel_data) with  in it.
SELECT
             ect.entry_id
        ,    ect.author_id
        ,    ect.title
        ,    ect.status
        ,    ecd.field_id_13
        ,    ecd.field_id_14
        ,    ecd.field_id_15
        ,    ecd.field_id_25
        ,    ecd.field_id_27
        ,    ecd.field_id_28
        ,    ecd.field_id_29
        ,    ecd.field_id_30
        ,    ecd.field_id_31
        ,    ecd.field_id_32
        ,    ecd.field_id_33
        ,    ecd.field_id_34
        ,    ecd.field_id_35
        ,    exm.email
    FROM exp_channel_titles as ect
    LEFT JOIN exp_channel_data as ecd
      ON ecd.entry_id = ect.entry_id
    LEFT JOIN exp_members as exm
      ON exm.member_id = ect.author_id
WHERE ect.status = 'Members-id5'


In Topic: Error in SQL syntax LEFT JOIN

08 May 2012 - 10:21 AM

Add those columns to the initial list of selected columns.

Why are you using subqueries?


do add it like this exm.email, ecd.field_id_14, ecd.field_id_15 ... and is there a better way to do it other than subqueries?