FAQ
Hi,

I wanted to add some new user defined functions (UDF) to mysql 4.0.12-standard-log.
I read in the manual that it is possible if you can start with the option --with-mysqld-ldflags=-rdynamic.
Then I found that my distribution is most likely build with --disable-shared, which makes me believe that I cant use any UDFs with the current version and that it is probably not save to recompile without the --disable-shared.

So, my questions are:
Has anyone done this already on IRIX 6.5?
Can you give me some hints on how to start?
If I have to recompile, what do I have to do?
Can you give me some examples?

Thanks a lot for your time.

Bernd


=====================================================================

Please note that this e-mail and any files transmitted with it may be
privileged, confidential, and protected from disclosure under
applicable law. If the reader of this message is not the intended
recipient, or an employee or agent responsible for delivering this
message to the intended recipient, you are hereby notified that any
reading, dissemination, distribution, copying, or other use of this
communication or any of its attachments is strictly prohibited. If
you have received this communication in error, please notify the
sender immediately by replying to this message and deleting this
message, any attachments, and all copies and backups from your
computer.

Search Discussions

  • Jordan Morgan at Oct 10, 2003 at 4:41 am
    Hi,

    I have the following statement:

    echo "$tenureid<P>";

    if ($tenureid=3)
    {
    // get faculty employment record - award date
    $sql = "select TD.Award_Date from TenureDescription TD LEFT JOIN InstitutionEmployment IE on TD.TenureDescriptionID=IE.Tenure WHERE IE.FacultyMember='$fid'";
    $result = mysql_db_query($database, $sql, $connection) or die ("Error in query: $sql. " . mysql_error());

    // obtain data from resultset
    list($tenuredate) = mysql_fetch_row($result);

    echo "<B>Date Tenure Granted</B>: ";
    echo fixDate($tenuredate);
    echo "<P>";
    }
    else {

    echo "<B>Date Tenure Granted</B>: Null<P>";
    }

    and I can't figure out why I always get the following result:

    ----------------------------------------------------------------
    2

    Date Tenure Granted: 31 Dec 1969
    ---------------------------------------------------------------
    or
    ----------------------------------------------------------------
    1

    Date Tenure Granted: 31 Dec 1969
    ---------------------------------------------------------------

    when 1) tenureid <> 3, and 2) no 31 Dec 1969 date in the database anywhere.

    The only thing I can think of is that I modified the dropdown box for the tenure date on the data entry page like this:

    <tr>
    <td>Date Tenure Granted<br><font size="-2">(in mm-dd-yyyy format)</font></td>

    <td>
    <select name="tmm">
    <option value="0" selected='selected'></option>
    <? for ($x=1; $x<=12; $x++) { echo "<option value=\"" . sprintf("%02d", $x) . "\">" . sprintf("%02d", $x) . "</option>"; } ?>
    </select> -
    <select name="tdd">
    <option value="0" selected='selected'></option>
    <? for ($x=1; $x<=31; $x++) { echo "<option value=\"" . sprintf("%02d", $x) . "\">" . sprintf("%02d", $x) . "</option>"; } ?>
    </select> -
    <select name="tyyyy">
    <option value="0" selected='selected'></option>
    <!-- display from 1970 to (current year) -->
    <? for ($x=(date("Y", mktime())); $x>=1970; $x--) { echo "<option value=$x>$x</option>"; } ?>
    </select>
    </td>
    </tr>

    by adding <option value="0" selected='selected'></option> to those 3 fields as I want null to be a default selection. but I can't imagine why that'll mess up the if statement evaluation.

    It seems that the 1st if statement just runs whatever the tenureid is.

    Can anyone help me on this? I'm using PHP 4.2.2 and MySQL 3.23.54 btw.

    Thanks millions!

    Jordan
  • Diana Soares at Oct 10, 2003 at 7:01 am
    Look at:

    if ($tenureid=3)

    You're not comparing $tenureid with 3, you're assigning 3 to
    $ternureid... If you want to compare both values, you must use the
    operator "==" (and not only "=").

    On Fri, 2003-10-10 at 05:43, Jordan Morgan wrote:
    Hi,

    I have the following statement:

    echo "$tenureid<P>";

    if ($tenureid=3)
    {
    // get faculty employment record - award date
    $sql = "select TD.Award_Date from TenureDescription TD LEFT JOIN InstitutionEmployment IE on TD.TenureDescriptionID=IE.Tenure WHERE IE.FacultyMember='$fid'";
    $result = mysql_db_query($database, $sql, $connection) or die ("Error in query: $sql. " . mysql_error());

    // obtain data from resultset
    list($tenuredate) = mysql_fetch_row($result);

    echo "<B>Date Tenure Granted</B>: ";
    echo fixDate($tenuredate);
    echo "<P>";
    }
    else {

    echo "<B>Date Tenure Granted</B>: Null<P>";
    }

    and I can't figure out why I always get the following result:

    ----------------------------------------------------------------
    2

    Date Tenure Granted: 31 Dec 1969
    ---------------------------------------------------------------
    or
    ----------------------------------------------------------------
    1

    Date Tenure Granted: 31 Dec 1969
    ---------------------------------------------------------------

    when 1) tenureid <> 3, and 2) no 31 Dec 1969 date in the database anywhere.

    The only thing I can think of is that I modified the dropdown box for the tenure date on the data entry page like this:

    <tr>
    <td>Date Tenure Granted<br><font size="-2">(in mm-dd-yyyy format)</font></td>

    <td>
    <select name="tmm">
    <option value="0" selected='selected'></option>
    <? for ($x=1; $x<=12; $x++) { echo "<option value=\"" . sprintf("%02d", $x) . "\">" . sprintf("%02d", $x) . "</option>"; } ?>
    </select> -
    <select name="tdd">
    <option value="0" selected='selected'></option>
    <? for ($x=1; $x<=31; $x++) { echo "<option value=\"" . sprintf("%02d", $x) . "\">" . sprintf("%02d", $x) . "</option>"; } ?>
    </select> -
    <select name="tyyyy">
    <option value="0" selected='selected'></option>
    <!-- display from 1970 to (current year) -->
    <? for ($x=(date("Y", mktime())); $x>=1970; $x--) { echo "<option value=$x>$x</option>"; } ?>
    </select>
    </td>
    </tr>

    by adding <option value="0" selected='selected'></option> to those 3 fields as I want null to be a default selection. but I can't imagine why that'll mess up the if statement evaluation.

    It seems that the 1st if statement just runs whatever the tenureid is.

    Can anyone help me on this? I'm using PHP 4.2.2 and MySQL 3.23.54 btw.

    Thanks millions!

    Jordan


    --
    Diana Soares
  • Nobody at Oct 10, 2003 at 7:45 am
    I am not sure if this has any significance - but isn't 31 Dec 1969 the day
    before the UNIX epoch (1 Jan 1970 - i think)?

    Jordan, how are the dates stored in the database - as dates or unix
    timestamps?

    Also, the function fixDate isn't in the online PHP manual - is it a function
    defined by you? - could that not be doing something weird?


    Rory McKinley
    Nebula Solutions
    +27 82 857 2391
    rorym@nebula.co.za
    "There are 10 kinds of people in this world,
    those who understand binary and those who don't" (Unknown)
    ----- Original Message -----
    From: "Diana Soares" <dsoares@fc.up.pt>
    To: "Jordan Morgan" <jordan.morgan@usg.edu>
    Cc: "mysql" <mysql@lists.mysql.com>
    Sent: Friday, October 10, 2003 8:58 AM
    Subject: Re: newbie select statement question

    Look at:

    if ($tenureid=3)

    You're not comparing $tenureid with 3, you're assigning 3 to
    $ternureid... If you want to compare both values, you must use the
    operator "==" (and not only "=").

    On Fri, 2003-10-10 at 05:43, Jordan Morgan wrote:
    Hi,

    I have the following statement:

    echo "$tenureid<P>";

    if ($tenureid=3)
    {
    // get faculty employment record - award date
    $sql = "select TD.Award_Date from TenureDescription TD LEFT JOIN
    InstitutionEmployment IE on TD.TenureDescriptionID=IE.Tenure WHERE
    IE.FacultyMember='$fid'";
    $result = mysql_db_query($database, $sql, $connection) or die ("Error
    in query: $sql. " . mysql_error());
    // obtain data from resultset
    list($tenuredate) = mysql_fetch_row($result);

    echo "<B>Date Tenure Granted</B>: ";
    echo fixDate($tenuredate);
    echo "<P>";
    }
    else {

    echo "<B>Date Tenure Granted</B>: Null<P>";
    }

    and I can't figure out why I always get the following result:

    ----------------------------------------------------------------
    2

    Date Tenure Granted: 31 Dec 1969
    ---------------------------------------------------------------
    or
    ----------------------------------------------------------------
    1

    Date Tenure Granted: 31 Dec 1969
    ---------------------------------------------------------------

    when 1) tenureid <> 3, and 2) no 31 Dec 1969 date in the database
    anywhere.
    The only thing I can think of is that I modified the dropdown box for
    the tenure date on the data entry page like this:
    <tr>
    <td>Date Tenure Granted<br><font size="-2">(in mm-dd-yyyy
    format)</font></td>
    <td>
    <select name="tmm">
    <option value="0" selected='selected'></option>
    <? for ($x=1; $x<=12; $x++) { echo "<option value=\"" . sprintf("%02d",
    $x) . "\">" . sprintf("%02d", $x) . "</option>"; } ?>
    </select> -
    <select name="tdd">
    <option value="0" selected='selected'></option>
    <? for ($x=1; $x<=31; $x++) { echo "<option value=\"" . sprintf("%02d",
    $x) . "\">" . sprintf("%02d", $x) . "</option>"; } ?>
    </select> -
    <select name="tyyyy">
    <option value="0" selected='selected'></option>
    <!-- display from 1970 to (current year) -->
    <? for ($x=(date("Y", mktime())); $x>=1970; $x--) { echo "<option
    value=$x>$x</option>"; } ?>
    </select>
    </td>
    </tr>

    by adding <option value="0" selected='selected'></option> to those 3
    fields as I want null to be a default selection. but I can't imagine why
    that'll mess up the if statement evaluation.
    It seems that the 1st if statement just runs whatever the tenureid is.

    Can anyone help me on this? I'm using PHP 4.2.2 and MySQL 3.23.54 btw.

    Thanks millions!

    Jordan


    --
    Diana Soares


    --
    MySQL General Mailing List
    For list archives: http://lists.mysql.com/mysql
    To unsubscribe: http://lists.mysql.com/mysql?unsub=mysql@nebula.co.za
  • Jordan Morgan at Oct 10, 2003 at 12:21 pm
    The date is stored as dates instead of timestamps. Yes, that fixDate function is
    defined by me and it worked great with other dates I have stored. I'm really
    thinking my dropdown fields for the MM, DD, and YYYY on the data entry page has
    somethng wrong with it.

    do you think so?

    ps: thanks for checking for me btw.


    Nobody wrote:
    I am not sure if this has any significance - but isn't 31 Dec 1969 the day
    before the UNIX epoch (1 Jan 1970 - i think)?

    Jordan, how are the dates stored in the database - as dates or unix
    timestamps?

    Also, the function fixDate isn't in the online PHP manual - is it a function
    defined by you? - could that not be doing something weird?

    Rory McKinley
    Nebula Solutions
    +27 82 857 2391
    rorym@nebula.co.za
    "There are 10 kinds of people in this world,
    those who understand binary and those who don't" (Unknown)
    ----- Original Message -----
    From: "Diana Soares" <dsoares@fc.up.pt>
    To: "Jordan Morgan" <jordan.morgan@usg.edu>
    Cc: "mysql" <mysql@lists.mysql.com>
    Sent: Friday, October 10, 2003 8:58 AM
    Subject: Re: newbie select statement question
    Look at:

    if ($tenureid=3)

    You're not comparing $tenureid with 3, you're assigning 3 to
    $ternureid... If you want to compare both values, you must use the
    operator "==" (and not only "=").

    On Fri, 2003-10-10 at 05:43, Jordan Morgan wrote:
    Hi,

    I have the following statement:

    echo "$tenureid<P>";

    if ($tenureid=3)
    {
    // get faculty employment record - award date
    $sql = "select TD.Award_Date from TenureDescription TD LEFT JOIN
    InstitutionEmployment IE on TD.TenureDescriptionID=IE.Tenure WHERE
    IE.FacultyMember='$fid'";
    $result = mysql_db_query($database, $sql, $connection) or die ("Error
    in query: $sql. " . mysql_error());
    // obtain data from resultset
    list($tenuredate) = mysql_fetch_row($result);

    echo "<B>Date Tenure Granted</B>: ";
    echo fixDate($tenuredate);
    echo "<P>";
    }
    else {

    echo "<B>Date Tenure Granted</B>: Null<P>";
    }

    and I can't figure out why I always get the following result:

    ----------------------------------------------------------------
    2

    Date Tenure Granted: 31 Dec 1969
    ---------------------------------------------------------------
    or
    ----------------------------------------------------------------
    1

    Date Tenure Granted: 31 Dec 1969
    ---------------------------------------------------------------

    when 1) tenureid <> 3, and 2) no 31 Dec 1969 date in the database
    anywhere.
    The only thing I can think of is that I modified the dropdown box for
    the tenure date on the data entry page like this:
    <tr>
    <td>Date Tenure Granted<br><font size="-2">(in mm-dd-yyyy
    format)</font></td>
    <td>
    <select name="tmm">
    <option value="0" selected='selected'></option>
    <? for ($x=1; $x<=12; $x++) { echo "<option value=\"" . sprintf("%02d",
    $x) . "\">" . sprintf("%02d", $x) . "</option>"; } ?>
    </select> -
    <select name="tdd">
    <option value="0" selected='selected'></option>
    <? for ($x=1; $x<=31; $x++) { echo "<option value=\"" . sprintf("%02d",
    $x) . "\">" . sprintf("%02d", $x) . "</option>"; } ?>
    </select> -
    <select name="tyyyy">
    <option value="0" selected='selected'></option>
    <!-- display from 1970 to (current year) -->
    <? for ($x=(date("Y", mktime())); $x>=1970; $x--) { echo "<option
    value=$x>$x</option>"; } ?>
    </select>
    </td>
    </tr>

    by adding <option value="0" selected='selected'></option> to those 3
    fields as I want null to be a default selection. but I can't imagine why
    that'll mess up the if statement evaluation.
    It seems that the 1st if statement just runs whatever the tenureid is.

    Can anyone help me on this? I'm using PHP 4.2.2 and MySQL 3.23.54 btw.

    Thanks millions!

    Jordan


    --
    Diana Soares


    --
    MySQL General Mailing List
    For list archives: http://lists.mysql.com/mysql
    To unsubscribe: http://lists.mysql.com/mysql?unsub=mysql@nebula.co.za
    --
    MySQL General Mailing List
    For list archives: http://lists.mysql.com/mysql
    To unsubscribe: http://lists.mysql.com/mysql?unsub=jordan.morgan@usg.edu
    --
    Jordan Morgan
    Information Analyst - GeorgiaFIRST HRMS Project
    Board of Regents
    Office of Information and Instructional Technology
    1865 West Broad Street, Athens, GA 30606-3539
    Phone: (706) 369-6232
    Fax: (706) 369-6429
    mailto:jordan.morgan@usg.edu http://www.usg.edu
  • Rory McKinley at Oct 13, 2003 at 7:41 am
    Hi Jordan

    Have had a look at the date input page, and the source code that it produces
    looks fine. If you still haven't sorted it out could I suggest the
    following:

    Output the tenure date at the following points in the application:

    1) When it is returned by the input form.
    2) When it is returned from the database (before being input into
    fixdate()).
    3) Within fixdate.

    See if the results are consistent throughout.

    Rory McKinley
    Nebula Solutions
    +27 82 857 2391
    rorym@nebula.co.za
    "There are 10 kinds of people in this world,
    those who understand binary and those who don't" (Unknown)
    ----- Original Message -----
    From: "Jordan Morgan" <jordan.morgan@usg.edu>
    To: "Nobody" <mysql@nebula.co.za>
    Cc: "Diana Soares" <dsoares@fc.up.pt>; "mysql" <mysql@lists.mysql.com>
    Sent: Friday, October 10, 2003 2:24 PM
    Subject: Re: newbie select statement question

    The date is stored as dates instead of timestamps. Yes, that fixDate
    function is
    defined by me and it worked great with other dates I have stored. I'm really
    thinking my dropdown fields for the MM, DD, and YYYY on the data entry page has
    somethng wrong with it.

    do you think so?

    ps: thanks for checking for me btw.


    Nobody wrote:
    I am not sure if this has any significance - but isn't 31 Dec 1969 the
    day
    before the UNIX epoch (1 Jan 1970 - i think)?

    Jordan, how are the dates stored in the database - as dates or unix
    timestamps?

    Also, the function fixDate isn't in the online PHP manual - is it a
    function
    defined by you? - could that not be doing something weird?

    Rory McKinley
    Nebula Solutions
    +27 82 857 2391
    rorym@nebula.co.za
    "There are 10 kinds of people in this world,
    those who understand binary and those who don't" (Unknown)
    ----- Original Message -----
    From: "Diana Soares" <dsoares@fc.up.pt>
    To: "Jordan Morgan" <jordan.morgan@usg.edu>
    Cc: "mysql" <mysql@lists.mysql.com>
    Sent: Friday, October 10, 2003 8:58 AM
    Subject: Re: newbie select statement question
    Look at:

    if ($tenureid=3)

    You're not comparing $tenureid with 3, you're assigning 3 to
    $ternureid... If you want to compare both values, you must use the
    operator "==" (and not only "=").

    On Fri, 2003-10-10 at 05:43, Jordan Morgan wrote:
    Hi,

    I have the following statement:

    echo "$tenureid<P>";

    if ($tenureid=3)
    {
    // get faculty employment record - award date
    $sql = "select TD.Award_Date from TenureDescription TD LEFT JOIN
    InstitutionEmployment IE on TD.TenureDescriptionID=IE.Tenure WHERE
    IE.FacultyMember='$fid'";
    $result = mysql_db_query($database, $sql, $connection) or die
    ("Error
    in query: $sql. " . mysql_error());
    // obtain data from resultset
    list($tenuredate) = mysql_fetch_row($result);

    echo "<B>Date Tenure Granted</B>: ";
    echo fixDate($tenuredate);
    echo "<P>";
    }
    else {

    echo "<B>Date Tenure Granted</B>: Null<P>";
    }

    and I can't figure out why I always get the following result:

    ----------------------------------------------------------------
    2

    Date Tenure Granted: 31 Dec 1969
    ---------------------------------------------------------------
    or
    ----------------------------------------------------------------
    1

    Date Tenure Granted: 31 Dec 1969
    ---------------------------------------------------------------

    when 1) tenureid <> 3, and 2) no 31 Dec 1969 date in the database
    anywhere.
    The only thing I can think of is that I modified the dropdown box
    for
    the tenure date on the data entry page like this:
    <tr>
    <td>Date Tenure Granted<br><font size="-2">(in mm-dd-yyyy
    format)</font></td>
    <td>
    <select name="tmm">
    <option value="0" selected='selected'></option>
    <? for ($x=1; $x<=12; $x++) { echo "<option value=\"" .
    sprintf("%02d",
    $x) . "\">" . sprintf("%02d", $x) . "</option>"; } ?>
    </select> -
    <select name="tdd">
    <option value="0" selected='selected'></option>
    <? for ($x=1; $x<=31; $x++) { echo "<option value=\"" .
    sprintf("%02d",
    $x) . "\">" . sprintf("%02d", $x) . "</option>"; } ?>
    </select> -
    <select name="tyyyy">
    <option value="0" selected='selected'></option>
    <!-- display from 1970 to (current year) -->
    <? for ($x=(date("Y", mktime())); $x>=1970; $x--) { echo "<option
    value=$x>$x</option>"; } ?>
    </select>
    </td>
    </tr>

    by adding <option value="0" selected='selected'></option> to those 3
    fields as I want null to be a default selection. but I can't imagine why
    that'll mess up the if statement evaluation.
    It seems that the 1st if statement just runs whatever the tenureid
    is.
    Can anyone help me on this? I'm using PHP 4.2.2 and MySQL 3.23.54
    btw.
    Thanks millions!

    Jordan


    --
    Diana Soares


    --
    MySQL General Mailing List
    For list archives: http://lists.mysql.com/mysql
    To unsubscribe:
    http://lists.mysql.com/mysql?unsub=mysql@nebula.co.za
    --
    MySQL General Mailing List
    For list archives: http://lists.mysql.com/mysql
    To unsubscribe:
    http://lists.mysql.com/mysql?unsub=jordan.morgan@usg.edu
    --
    Jordan Morgan
    Information Analyst - GeorgiaFIRST HRMS Project
    Board of Regents
    Office of Information and Instructional Technology
    1865 West Broad Street, Athens, GA 30606-3539
    Phone: (706) 369-6232
    Fax: (706) 369-6429
    mailto:jordan.morgan@usg.edu http://www.usg.edu

  • Jordan Morgan at Oct 10, 2003 at 12:19 pm
    oh.... thanks! I guess that's why I'm a newbie.

    Diana Soares wrote:
    Look at:

    if ($tenureid=3)

    You're not comparing $tenureid with 3, you're assigning 3 to
    $ternureid... If you want to compare both values, you must use the
    operator "==" (and not only "=").
    On Fri, 2003-10-10 at 05:43, Jordan Morgan wrote:
    Hi,

    I have the following statement:

    echo "$tenureid<P>";

    if ($tenureid=3)
    {
    // get faculty employment record - award date
    $sql = "select TD.Award_Date from TenureDescription TD LEFT JOIN InstitutionEmployment IE on TD.TenureDescriptionID=IE.Tenure WHERE IE.FacultyMember='$fid'";
    $result = mysql_db_query($database, $sql, $connection) or die ("Error in query: $sql. " . mysql_error());

    // obtain data from resultset
    list($tenuredate) = mysql_fetch_row($result);

    echo "<B>Date Tenure Granted</B>: ";
    echo fixDate($tenuredate);
    echo "<P>";
    }
    else {

    echo "<B>Date Tenure Granted</B>: Null<P>";
    }

    and I can't figure out why I always get the following result:

    ----------------------------------------------------------------
    2

    Date Tenure Granted: 31 Dec 1969
    ---------------------------------------------------------------
    or
    ----------------------------------------------------------------
    1

    Date Tenure Granted: 31 Dec 1969
    ---------------------------------------------------------------

    when 1) tenureid <> 3, and 2) no 31 Dec 1969 date in the database anywhere.

    The only thing I can think of is that I modified the dropdown box for the tenure date on the data entry page like this:

    <tr>
    <td>Date Tenure Granted<br><font size="-2">(in mm-dd-yyyy format)</font></td>

    <td>
    <select name="tmm">
    <option value="0" selected='selected'></option>
    <? for ($x=1; $x<=12; $x++) { echo "<option value=\"" . sprintf("%02d", $x) . "\">" . sprintf("%02d", $x) . "</option>"; } ?>
    </select> -
    <select name="tdd">
    <option value="0" selected='selected'></option>
    <? for ($x=1; $x<=31; $x++) { echo "<option value=\"" . sprintf("%02d", $x) . "\">" . sprintf("%02d", $x) . "</option>"; } ?>
    </select> -
    <select name="tyyyy">
    <option value="0" selected='selected'></option>
    <!-- display from 1970 to (current year) -->
    <? for ($x=(date("Y", mktime())); $x>=1970; $x--) { echo "<option value=$x>$x</option>"; } ?>
    </select>
    </td>
    </tr>

    by adding <option value="0" selected='selected'></option> to those 3 fields as I want null to be a default selection. but I can't imagine why that'll mess up the if statement evaluation.

    It seems that the 1st if statement just runs whatever the tenureid is.

    Can anyone help me on this? I'm using PHP 4.2.2 and MySQL 3.23.54 btw.

    Thanks millions!

    Jordan


    --
    Diana Soares

    --
    MySQL General Mailing List
    For list archives: http://lists.mysql.com/mysql
    To unsubscribe: http://lists.mysql.com/mysql?unsub=jordan.morgan@usg.edu
    --
    Jordan Morgan
    Information Analyst - GeorgiaFIRST HRMS Project
    Board of Regents
    Office of Information and Instructional Technology
    1865 West Broad Street, Athens, GA 30606-3539
    Phone: (706) 369-6232
    Fax: (706) 369-6429
    mailto:jordan.morgan@usg.edu http://www.usg.edu

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmysql @
categoriesmysql
postedOct 9, '03 at 2:52p
activeOct 13, '03 at 7:41a
posts7
users5
websitemysql.com
irc#mysql

People

Translate

site design / logo © 2022 Grokbase