Jump to content

Search the Community

Showing results for tags 'result'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 4 results

  1. I am having an issue where the output from a MySQL stored procedure is not handled correctly, when there is NO resultset, as opposed to a NULL resultset. For example: 1) select * from myTable; //this works, there are 0,1, multiple records returned 2) select * from myTable where 1=2; //this works, there are 0 records returned in a NULL resultset 3) set user_level = 'user'; if user_level = 'admin' then select * from myTable; //this never hits end if; There is an error in #3, the query is never touched, so NO resultset is returned. This is different from what happens in example #2, where a resultset is returned, it is just NULL. My code looks like this: if ( ($result = $mysqli_conn->query($SQL)) == false ) { printf("Invalid query: %s\nWhole query: %s\n", $mysqli_conn->error, $SQL); } else { while ($myrow = $result->fetch_array(MYSQLI_ASSOC)) { ... do something here } Any thoughts on how to handle this cleanly? Thanks all, Frank
  2. i am trying to develop a registration form where the user fill the form and submit it then the status and the id should be displayed. i have used uniq_id function to generate a random id and with the help of this reference id i can retrieve the actual ID and display it back to the user. But unfortunately i am successful with the first registration after the first registration it throws an error that Error: "Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 9". my code: <?php include(conn.php); $id = $_GET['id']; $adv = $_GET['adv']; $name = $_GET['name']; $address = $_GET['address']; $pincode = $_GET['pincode']; $email = $_GET['email']; $fax = $_GET['fax']; $mobile = $_GET['mobile']; $amount = $_GET['amount']; $ddchno = $_GET['ddchno']; $bank = $_GET['bank']; $register = mysql_query( "insert into exbadv ( refid,adv,name,address,pincode,email,fax,mobile,amount,ddchno,bank) values ('$id','$adv','$name','$address','$pincode','$email','$fax','$mobile','$amount','$ddchno','$bank')"); $id = $_GET['id']; $result = mysql_query("SELECT id FROM exbadv WHERE refid = '$id'"); echo 'Your Registration id is ';echo mysql_result($result,0); ?> Plz help me out,thank u.
  3. i am trying to develop a registration form where the user fill the form and submit it then the status and the id should be displayed. i have used uniq_id function to generate a random id and with the help of this reference id i can retrieve the actual ID and display it back to the user. But unfortunately i am successful with the first registration after the first registration it throws an error that Error: "Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 9". my code: <?php include(conn.php); $id = $_GET['id']; $adv = $_GET['adv']; $name = $_GET['name']; $address = $_GET['address']; $pincode = $_GET['pincode']; $email = $_GET['email']; $fax = $_GET['fax']; $mobile = $_GET['mobile']; $amount = $_GET['amount']; $ddchno = $_GET['ddchno']; $bank = $_GET['bank']; $register = mysql_query( "insert into exbadv ( refid,adv,name,address,pincode,email,fax,mobile,amount,ddchno,bank) values ('$id','$adv','$name','$address','$pincode','$email','$fax','$mobile','$amount','$ddchno','$bank')"); $id = $_GET['id']; $result = mysql_query("SELECT id FROM exbadv WHERE refid = '$id'"); echo 'Your Registration id is ';echo mysql_result($result,0); ?> Plz help me out,thank u.
  4. Hi All, This code gives me the quantity output of the ordered products (per line): (int)($product['product_quantity']) Like: Product 1 - 5x Product 2 - 10x So, i want a function, that outputs the total of the order, like: Total products: 15x How can i store the code in an array and give the total order output? Thanks in advance! Bart
×
×
  • 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.