Jump to content

talreja_sapna

Members
  • Posts

    16
  • Joined

  • Last visited

    Never

Posts posted by talreja_sapna

  1. hi
    wht u could do is use a query with join but u will have to specify field names in select statement

    <?php
    header("Content-type: application/vnd.ms-excel");
    header("Content-Disposition: attachment; filename=spreadsheet.xls");
    header("Pragma: no-cache");
    header("Expires: 0");

    define(db_host, "localhost");
    define(db_user, "root");
    define(db_pass, "root");
    define(db_link, mysql_connect(db_host,db_user,db_pass));
    define(db_name, "person");
    mysql_select_db(db_name);

    $select = "SELECT general.id,name,address,hobbies,interest FROM general,interest where general.id=interest.id ";
    $export = mysql_query($select);
    $fields = mysql_num_fields($export);

    for ($i = 0; $i < $fields; $i++) {
    $header .= mysql_field_name($export, $i) . "\t";
    }

    while($row = mysql_fetch_row($export)) {
    $line = '';
    foreach($row as $value) {
    if ((!isset($value)) OR ($value == "")) {
    $value = "\t";
    } else {
    //$value = str_replace('"', '""', $value);
    $value = $value . "\t";
    }
    $line .= $value;
    }
    $data .= trim($line)."\n";
    }
    $data = str_replace("\r","",$data);

    if ($data == "") {
    $data = "\n(0) Records Found!\n";
    }
    // print the db
    echo "$header \n $data" ;
    ?>
  2. i have installed civicrm on joomla1.0.11 the installation completed successfully but when i am trying to access any item frm civicrm menu
    error is coming
    Sorry. A non-recoverable error has occurred.

    Database Error Code: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ) ORDER BY name' at line 4, 1064
    plz help me solve this problem
    thanks
    sapna
  3. i have installed civicrm on joomla1.0.11 the installation completed successfully but wheni am trying to acess civicrm any page
    error is coming
    Sorry. A non-recoverable error has occurred.

    Database Error Code: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ) ORDER BY name' at line 4, 1064
    thanks
    sapna
  4. hi
    thanks
    actually i am working with the mod_rewrite for the first time
    so for checking whether its working or not
    i had written the following in .htaccess

    RewriteEngine On
    RewriteRule ^/alice\.html$ bob\.html

    if user try to access alice.html bob.html should be called but its not working
    thanks
    sapna
  5. This code might help u

    <?php

    if (isset($_GET['ID'])) {
      $vidID = $_GET['ID'];
      $Vidfile = $_GET['ID'];
    } else {
      $vidID = NULL;
      $Vidfile = NULL;
    }
    $query2 = "SELECT * FROM videos WHERE ID = ('$vidID')";
    $result=mysql_query($query2);
    while($row=mysql_fetch_array($result)
    {
    extract($row);
    //for example if ur field name is $filename
        unlink($filename);
    }

    $query = "DELETE FROM videos WHERE ID = ('$vidID')";
    $result = mysql_query($query);


    echo "The video has been deleted.";

    ?>
  6. hi
    actually wht i want is as soon as user register his homepage should be created(dynamic)
    example if user registers by the name john
    then he can visit his home page by the following url
    http://domainname/john
    thanks
    sapna
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.