I'm going to pull a recordset and I want to load the data into a table

Loop through it and I see it passing through all data correctly, but when I try to assign to a table using $i - it just continues replacing, it does not add a new value in the table.

Thanks in advance!

$index = "";
$service_singular = "";
$service_plural = "";
$sub_service = "";
$description = "";
$duration = "";
$duration_descript = "";
$price = "";
$i = 0;
If ($fac_id! = "" & & $fac_id! = 0) {}
If ($stmt = $mysqli - > prepare ("SELECT ' index', 'service_singular', 'service_plural', 'sub_service', 'description', 'length', 'duration_descript', 'price' OF 'service' WHERE 'fac_id' =?")) {
$stmt-> bind_param (of ', $fac_id); Bind "fac_id" to the parameter.
$stmt-> execute(); Execute the prepared query.
$stmt-> store_result();
$i = $stmt-> num_rows;
$stmt-> bind_result ($index, $service_singular, $service_plural, $sub_service, $description, $duration, $duration_descript, $price); read the result variables.
While ($stmt-> fetch() {)}

$i = $i++; }

}

Thanks for watching it.

~~~~~~~~~~~~

); read the result variables.

While ($service-> fetch() {)}

[$srv_rows] = array ("index"-online $index, "m_serve" => $m_serve, "sub_service" => $sub_service, "description"-online $des cription, "term"-online $duration, "duration_descript" => $duration_descript, 'price'-$price, "delete"-online $remove, online "display"-online $display).

}

~~~~~~~~~~~~~~

This gave me what I needed.

Tags: Coding Corner

Similar Questions

  • My wife and I have laptops and we want to combine the data both on a Mac. Including two Itunes accounts. This is possible by using the migration on each PC asst?

    In what concerns the transfer of data from a PC to a MAC, my wife and I have laptops and we want to combine the data both on a Mac. Including two Itunes accounts. This is possible by using the migration on each PC asst?

    You can bind the whole apple ID using family sharing. If you have trouble doing this, you can go to the apple store, and they would be happy to help you.

  • Hi all, how can restrict us and end from 'a droping table' user but need access to the 'workshop of data' to load the data into the spreadsheet.

    Hi all

    How can we limit and end user of "droping a table."

    For example: I created an array of login admin and gave access to "SQL workshop" for the end user. but after that I have created a table, the end user cannot access object browser shop and drop a table. one thing we can do does not have access to the SQL workshop. However, my requirement is the user needs to access the data workshop, which is located under the SQL workshop but they it should not access the tables.

    Kindly let me know how we can do this?

    Thank you

    Vinod Paparaju

    User13309437-Oracle wrote:

    Please update your forum profile with a recognizable username instead of "User13309437": Video tutorial how to change username available

    Always include the information referred to in these guidelines when you post a question: How to get the answers from the forum

    How can we limit and end user of "droping a table."

    For example: I created an array of login admin and gave access to "SQL workshop" for the end user. but after that I have created a table, the end user cannot access object browser shop and drop a table. one thing we can do does not have access to the SQL workshop. However, my requirement is the user needs to access the data workshop, which is located under the SQL workshop but they it should not access the tables.

    Kindly let me know how we can do this?

    There is no way not to restrict access to individual tools in the workshop of SQL. Rather than give the developer-level end-users to access the SQL workshop, create applications containing data support Wizards, where end-user access can be controlled using the standard APEX authentication and authorization schemas.

  • Select the data in a table and update in another table

    Dear experts,

    create the table TB_ENCRYPT

    (

    Identification number,

    Varchar2 (200) KEY

    );

    INSERT INTO TB_ENCRYPT VALUES(1,'HJUVHDUIFBSDGVU');

    SELECT * FROM TB_ENCRYPT;

    1 HJUVHDUIFBSDGVU

    create TABLE users)

    username, NUMBER of

    password VARCHAR2 (200)

    );

    Insert users

    values (1, 123 # "")

    Insert users

    values (2, 456 #')

    Select * from users;

    1 123 #.

    # 2 456

    I want to select the data KEY for table TB_ENCRYPT column and update in the column of tables for the respective key user password

    TB_ENCRYPT table contains only a single key value. Comparing this key, I want to update the old value of the key to the new value.

    For encryption and decryption I followed the java class method.no is worried about that.

    create or replace

    PACKAGE PCK_ENC AUTHID CURRENT_USER AS

    FUNCTION DECRYPT (VARCHAR arg0, arg1 VARCHAR) AS VARCHAR BACK LANGUAGE JAVA NAME 'Encrclass.decrypt (java.lang.String, java.lang.String) return java.lang.String ';

    FUNCTION ENCRYPT (VARCHAR arg0, arg1 VARCHAR) AS VARCHAR BACK LANGUAGE JAVA NAME 'Encrclass.encrypt (java.lang.String, java.lang.String) return java.lang.String ';

    END;

    SELECT PCK_ENC. ENCRYPT('1234','HJUVHDUIFBSDGVU') FROM DUAL;

    HERE,

    1234 - is the password of the users table column data

    HJUVHDUIFBSDGVU - represents the key of table TB_ENCRYPT column data.

    Comparing this key, I want to update the old value of the key to the new value.

    I tried with this method

    declare

    cursor c1 is

    Select the key

    of TB_ENCRYPT

    where id = 1

    update the id;

    Start

    for c1_rec looping c1

    update users

    password is PCK_ENC. Encrypt (Password, Key)

    the location being c1;

    commit;

    end loop;

    end;

    /

    Help, please

    You can use the MERGE statement.

    merge into users
    using tb_encrypt
       on (id = userid)
      when matched then
          update set password = PCK_ENC.ENCRYPT(password,key);
    

    And why you encrypt your password. This isn't a good idea. Just password hash.

  • If I'm going to activate a campaign and then turn it off, the segment will be get updated?

    If I'm going to activate a campaign and then turn it off, the segment will be get updated?

    Hey,.

    If the segments are updated every hour until the campaign is disabled.

    Thank you

  • Could not initialize and I need to recover the data on the hard drive.

    Original title: computer MOM will not start and I need to recover the data on the hard drive.

    It's an old computer and I do not know what version of Windows it was running.  I guess I need a bootdisk of exploitation, but where can I download that?  Or would it be easier to pull and make a secondary drive in my computer that I just replaced?  It works under Windows XP.

    Hello

    If the old system does not start could be the hard drive. Put the hard drive in another computer as a 2nd drive and then access the files. If you use a computer XP, Vista or Windows 7, you should be able to access the files, unless the drive has failed.

    You can save your files by putting the drive in another computer as a 2nd drive (better) or a USB external drive case and then save up to removable media such as CD, DVD or other USB drives. Of course a real store of the computer or the manufacturer of your system can help to recover the files.

    Or you can use a boot Ubuntu CD to back up data. (This will not work if the hard disk is defective or other issues preventing the system from booting from the CD/DVD drive.)

    Use Ubuntu Live CD to backup files from your Windows computer dead
    http://www.howtogeek.com/HOWTO/Windows-Vista/use-Ubuntu-Live-CD-to-backup-files-from-your-dead-Windows-computer

    I hope this helps.
    --------------------------------------------------------------------------------------------
    Rob Brown - Microsoft MVP<- profile="" -="" windows="" and="" devices="" for="" it :="" bicycle="" -="" mark="" twain="" said="" it="">

  • When the signer will sign on the doc that I want to fill the date today, and he should be able to change the date

    Hello world.

    I joined salesforce with echosign.

    I need a help, whenever signatory 2 goes to sign on the doc I want to fill the date today and the signatory 2 should be able to change the date preceding the date of signature. 

    Hello

    So firstly follow the post on the forum to create a formula in salesforce field that creates the date as a string and this merge field in an agreement echosign.

    For example, configure the following field to receive the sfdc date string:
    {{todayeditable_es_:signer1}}

    of course to call the field all you want and also assign the right if not signer signatory 1.

    You can then add a calculated field that compares the date in the field of the todayedtiable against today's date

    {{datecheck_es_:signer1:calc(if(date([today]) > now(), "today larger than today", "continue to next step"))}}

    so, for example today's date is February 12, 2015
    the date entered in the todayeditable field is
    12/02/2015
    the audit date field will say "contine" (or whatever text put you between quotation marks)
    If the date entered has been
    13/02/2015
    datecheck displays "today higher than today.

  • I bought an iPhone 6s and want to transfer the data from my old iPhone 4S with iTunes

    I bought an iPhone 6s and want to transfer the data from my old iPhone 4S with iTunes but it says "the"iPhone"iPhone cannot be used because it requires a newer version of iTunes. Go to www.itunes.com to download the latest version of iTunes. "

    I checked and the version of itunes is the latest AID!

    DooozySue wrote:

    I checked and the version of itunes is the latest AID!

    Most likely, what you found, is that the iTunes version is the latest available for your operating system.

    The latest version of iTunes is 12.4.3.  This version requires at least OS X 10.8.5 or later version, or Windows 7 or later version.

    If your iTunes version is earlier than 12.4.3, it will probably not recognize your 6s performance iPhone iOS 9.

    If you do not have the required operating system, get first.  Then download from iTunes

    http://www.Apple.com/iTunes/download

  • Had an accident and I want to import my favorites into Firefox but the only option in the Import Wizard is that is my B/brands are saved on a memory stick. Any solution please. ?

    Had an accident and I want to import my favorites into Firefox but the only option in the Import Wizard is that is my B/brands are saved on a memory stick. Any solution please. ?

    How bookmarks are stored? If they are in an HTML file, you can go to bookmarks > organize bookmarks > import and backup > import HTML, select "in a HTML file" and go from there.

    If you have not currently saved favorites and b / m to import is already in a FF bookmarks file you could just more copy to your profile.

  • I have a Mac and I want to remove the feature "Firefox prevented this site automatically redirecting to another page. Show you how do to Windows, but I have not found how to for Mac

    I have a Mac and I want to remove the feature "Firefox prevented this site automatically redirecting to another page. Show you how do to Windows, but I have not found how to for Mac

    This has happened

    Each time Firefox opened

    == I try to go to page to a new page

    Thanks Cor - el.

  • update date and time for 3.6 numbers does not show the time and does not automatically update the date

    The 'update date and time"for numbers of 3.6 does not show the time and does not automatically update the date.  What should I do?  Thank you.

    Hi david,

    where do you find ' update of the date and time.

    Quinn

  • computer inheirerted of father and you want to restore the factory installed vista system but do not know the password of admin fathers

    computer inheirerted of father and you want to restore the factory installed vista system but do not know the password of admin fathers

    Hello

    You should not have a password to reinstall Vista.

    Microsoft prohibits any help given in these Forums for you help bypass or "crack" passwords lost or forgotten.

    Here's information from Microsoft, explaining that the policy:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-security/keeping-passwords-secure-Microsoft-policy-on/39f56ef0-5d68-41AD-9daa-6e6019c25d37

    There are several methods to reinstall Vista.

    There is no Windows Vista downloads available from Microsoft.

    You can contact your computer manufacturer and ask them to send you a set of recovery disks.

    They should do this for a small fee.

    To reinstall Vista using their recovery disk/s, you start from the 1st recovery disk they provide and follow the manufacturer's instructions to reinstall:

    You need to change the Boot order to make the DVD/CD drive 1st in the boot order:

    How to change the Boot order in BIOS:

    http://pcsupport.about.com/od/fixtheproblem/SS/bootorderchange.htm

    And if you have never received a recovery disk when you bought your computer, there should be a recovery Partition on the hard drive to reinstall Vista on how you purchased your computer.

    The recovery process can be started by pressing a particular combination of the key or keys at startup. (Power on / start)

    Maybe it's F10, F11, Alt + F10, etc., depending on the manufacturer.

    Ask them to the proper key sequence.

    Some manufacturers have more available Vista recovery disks.

    If this happens, you may need to try this instead:

    You can also borrow and use a Microsoft Vista DVD, which contains the files for the different editions of Vista (Home Basic, Home Premium, Business and Ultimate) must be installed. The product key on your computer / Laptop box determines what Edition is installed.

    Other manufacturers recovery DVDs are should not be used for this purpose.

    And you need to know the version of 'bit' for Vista, as 32-bit and 64-bit editions come on different DVDs

    Here's how to do a clean install of Vista using a DVD of Vista from Microsoft:

    "How to do a clean install and configure with a full Version of Vista '

    http://www.Vistax64.com/tutorials/117366-clean-install-full-version-Vista.html

    And once the operating system is installed, go to your computer manufacturer's website and get the latest drivers for your particular model or laptop computer.

    And phone Activation may be necessary when you use the above installation method.

    "How to activate Vista normally and by Activation of the phone '

    http://www.Vistax64.com/tutorials/84488-activate-Vista-phone.html

    See you soon.

  • Hi, I have an acer 7739G and I want to use the construction in camera, but I don't know how to put on... help please!

    Hi, I have an acer 7739G and I want to use the construction in camera, but I don't know how to put on... help please!

    Hello

    Search for information to Acer.

    http://support.Acer.com/us/en/default.aspx

    See you soon.

  • I have great meda database on excel and want to display the data comparitable on media player

    I LIKE TO "UPSIDE DOWN SCREEN" BETWEEN MEDIA PLAYER AND EXCEL DATABASE

    I have great meda database on excel and want to display the data comparitable on media player

    See: http://answers.microsoft.com/en-us/windows/forum/windows_7-desktop/split-screen-option-windows-7/369d5ef8-379a-4701-891f-04af477f5cc5

  • I had a hard drive crash and had to move all the data again. Now, I get an error saying that my Visa is not an authorized version. How can I find the product key to reactivate?

    Vista Product Code question

    I had a hard drive crash and had to move all the data again.  Now, I get an error saying that my Visa is not an authorized version.  How can I find the product key to reactivate?  I don't have the sticker on the back and the software I have does not have the code?  I bought this laptop DELL at Best Buy a little more than a year.

    Thank you.

    Hello

    This problem may occur if you make a significant hardware change. See the link provided below.

    Error message when you start Windows Vista: "your activation period has expired".

    http://support.Microsoft.com/kb/925616

    If the OS came preinstalled Dell you may need to contact Dell technical support for assistance.
    http://support.Dell.com/support/topics/global.aspx/support/win7_support/win7_portal?c=us&CS=04&l=en&s=BSD

Maybe you are looking for

  • HP Pavilion p 15-132nd: unknown device of the HP wireless button driver

    Madam, Sir, After you perform a clean installation of Windows, I noticed an unknown device which I can't find drivers for. The device has the following hardware id: ACPI\VEN_HPQ & DEV_6001. And I suspect the Wiriless button or something similair. Cou

  • E series counter

    Hey, evry. The task is to measure the time interval (approximately 10 ms) between the different edges of two digital lines increase. How can it be done using the 6052E card? Thanks in advance!

  • 3ds max scene file...

    What can I do to open the max files in my email?

  • 8600 pro updated

    Maybe you can save a call to support. I installed the complete software on a Win7 64 bit and XP 32 bit machine yesterday with support due to a defective installation CD. The XP machine you are prompted for a critical update and another update. I aske

  • LR plugins

    I recently got a new computer. I use LR CC on system Windows 10. I installed LR on the new computer. I alos have the Nik and OnOne plugins. I installed the Nik and OnOne 10 and when I click right/Edit in... the plugins do not appear in the menu dropd