• Member Avatar for AndrisP
    AndrisP

    Replied To a Post in how to submit my data

    You can select by country name but it is not good practice echo "<option value=\"".$row['NAME']."\">".$row['NAME']."</option>";
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in how to submit my data

    Select also ID of country. <tr> <td>Country Name</td> <td> <select name="countryID"> <?php $conn = oci_connect("username", "pswrd", "db"); $sql = 'SELECT id,name FROM country'; $stid = oci_parse($conn, $sql); $success = oci_execute($stid); …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching how to submit my data

    hi everyone i need help in my query which is that: 1.which country name i selected from my dropdown list 2.when i select any country_name its show more info in …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Select from database on submit

    Use of `&` inside REQUEST variable is not good idea. I suggest replace to `and` but if you realy want to use it then use as `&amp;`
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Select from database on submit

    Hi, so this is the most basic thing ever but i am having trouble with it. idk if its because of the code or it just can't be done or …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Pagination does not get the second page on page click

    I suggest to you use `filter_input()` method instead of `$_GET['page']` and set min, max, default values: <?php $perPage = 6; $stmt = $conn->prepare("select count(*) from tbl"); $stmt->execute(); $productCount = $stmt->fetchColumn(); …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Pagination does not get the second page on page click

    Hello, I have a products page which lists the pics of the products. I added pagination with bootstrap classes. I have 10 products in my database. I want to limit …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Exclamation PHP Drop Down List Populated By Oracle Database Rows is empty

    Try `echo "<option value=\"countryname1\">" . $row[(array_keys($row)[0])] . "</option>";`
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Exclamation PHP Drop Down List Populated By Oracle Database Rows is empty

    Try `echo "<option value=\"countryname1\">" . $row['NAME'] . "</option>";` Oracle DB usually return column names in upper case
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Exclamation PHP Drop Down List Populated By Oracle Database Rows is empty

    https://i.stack.imgur.com/YEopy.png it seems like fill by empty options. Check "Inspect Element" in browser. https://i.stack.imgur.com/dRS39.png Check your column names. In oracle db column name are not case sensitive but in PHP …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Exclamation PHP Drop Down List Populated By Oracle Database Rows is empty

    Are dropdown list fill by empty options or list is empty?
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Exclamation PHP Drop Down List Populated By Oracle Database Rows is empty

    Try to handle other errors <tr> <td>Country Name</td> <td> <select name="name"> <?php $conn = @oci_connect("username", "pswrd", "db"); $e = oci_error(); if($e){ exit($e['message']); } $sql = 'SELECT name FROM country'; $stid …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Exclamation PHP Drop Down List Populated By Oracle Database Rows is empty

    Method `oci_fetch_array()` will return all rows. Change to `oci_fetch_assoc()`
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Exclamation PHP Drop Down List Populated By Oracle Database Rows is empty

    ( https://i.stack.imgur.com/1LPVk.png ) i mention my link where output show when i press drop-down button then show empty fields but i have values in my sql table link ( https://i.stack.imgur.com/YEopy.png) …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Quotation

    Add backslashes before apostrophes `onclick="window.location.href='route(\'pemesanan\')';"` if you have to pass string `pemesanan` or add plus `onclick="window.location.href='route('+pemesanan+')';"` if "pemesanan" is javascript (number or object) variable name or put both if it …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Quotation

    Hello, This is laravel. Please help me fix the quotation so that my program works. <button type="button" onclick="window.location.href = 'route('pemesanan')';">Beli</button> If I click Beli (buy) it should run pemesanan (order) …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Find numbers divisible by 3 and 4

    Sorry i was wrong about last 4 bits
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Find numbers divisible by 3 and 4

    Actually results is numbers divisible by 12. Another way to find - check last 4 bits. It should be 1100
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Find numbers divisible by 3 and 4

    Write a program that displays all numbers divisible by 3 and 4 within a range entered by user. Display five numbers per line. Numbers are separated by exactly two spaces. …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Oracle SQL. How to output more than one record?

    Declare table type variable if you want to return e.g. type r_model_price is record ( p_model MODELS.NAME_MODEL%type ,p_price AUTOMOBILES.A_PRICE%type ); type tt_model_price is table of r_model_price index by binary_integer; create …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Oracle SQL. How to output more than one record?

    Try something like this: create or REPLACE procedure modelzz( VAR_MODEL IN MODELS.NAME_MODEL%TYPE ) as cursor c_automobiles is SELECT a.A_PRICE FROM AUTOMOBILES a join MODELS m on a.MODELS_ID_MODEL=m.ID_MODEL where m.NAME_MODEL=VAR_MODEl; VAR_PRICE …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Oracle SQL. How to output more than one record?

    I have two tables. MODELS and AUTOMOBILES. And procedure which export all models with name that user inputs and their price(stored in AUTOMOBILES). create or REPLACE procedure modelzz( VAR_MODEL IN …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in print data in columns

    You are set 25 symbols (+9 white space) width for each column - maybe output window is not so large
  • Member Avatar for AndrisP
    AndrisP

    Began Watching print data in columns

    I am trying to print my data in columns. For some reason every column but the last one lines up. Is there a way to fix this? while ((row = …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Are Dynamic and Dependent Dropdown Possible?

    Another version mutch more compact and easy to configure <script type="text/javascript"> function donation(){ this.range = {'min':1,'max':10}; this.unit = {'hours':50, 'days':500, 'months':5000}; this.init = function(){ var sel = ['dn','sm','rs']; for(var k …
  • Member Avatar for AndrisP
    AndrisP

    Marked Solved Status for MySQL run script and log to dynamic file name

    Is the method in MySQL to set in SQL script dynamic log file name? e.g in Oracle PL/SQL set define on column sdate new_value sdate select to_char(sysdate,'YYYY.MM.DD_HH.MI') sdate from dual; …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in MySQL run script and log to dynamic file name

    Not so beautiful but I found another solution - add `--tee` to make connection mysql -u <username> -p -D <database> --tee ./install_$(date +"%Y-%m-%d_%H-%M").log MySQL does not support dynamic filename in …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in MySQL run script and log to dynamic file name

    @cereal - this do not workd inside SQL script file. I want to set command in script file tee ./dinamic_file_name_here.log or similar command \T ./dinamic_file_name_here.log but file name can not …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in MySQL run script and log to dynamic file name

    That's not what I'm looking for - its for install script
  • Member Avatar for AndrisP
    AndrisP

    Edited MySQL run script and log to dynamic file name

    Is the method in MySQL to set in SQL script dynamic log file name? e.g in Oracle PL/SQL set define on column sdate new_value sdate select to_char(sysdate,'YYYY.MM.DD_HH.MI') sdate from dual; …
  • Member Avatar for AndrisP
    AndrisP

    Created MySQL run script and log to dynamic file name

    Is the method in MySQL to set in SQL script dynamic log file name? e.g in Oracle PL/SQL set define on column sdate new_value sdate select to_char(sysdate,'YYYY.MM.DD_HH.MI') sdate from dual; …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching MySQL run script and log to dynamic file name

    Is the method in MySQL to set in SQL script dynamic log file name? e.g in Oracle PL/SQL set define on column sdate new_value sdate select to_char(sysdate,'YYYY.MM.DD_HH.MI') sdate from dual; …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Are Dynamic and Dependent Dropdown Possible?

    Would you think something like this? <!DOCTYPE html> <head> <script type="text/javascript"> function donation(){ this.dnts = [1,2,3,4,5,6,7,8,9,10]; this.cost = [50,500,5000]; this.unit = ['hours', 'days', 'months']; this.selected = [0,0]; this.init = function(){ …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Are Dynamic and Dependent Dropdown Possible?

    I'm attempting to simplify my fundraising page, and would like to show exactly how much each donation would help us out. I've listed the options below, but I would like …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Split a big if statement across multiple lines

    Its a reserved keyword in MySQL. Read this https://dev.mysql.com/doc/refman/5.5/en/keywords.html
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Split a big if statement across multiple lines

    It should work similar. But column name `date` is not good - add prefix or use it inside backticks
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Split a big if statement across multiple lines

    How would I split this big if statement across multiple lines? It works perfectly on one line. if (mysql_query(con, "CREATE TABLE Matches(match_id INT UNSIGNED PRIMARY KEY, date DATETIME NOT NULL, …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Instance of Child Class Error ?

    Line 2 replace `_init__` to `__init__`
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Instance of Child Class Error ?

    I need some help why can't I create an instance of the child class without an error ? class tv(): def _init__(self,color,screen,frame): self.color=color self.screen = screen self.frame = frame def …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Increment / decrement (x++, ++x...) not producing expected output

    Yes all good - unseparated output. Add new lines after each output. cin >> x; cout << x++ << "\n"; cout << ++x << "\n"; cout << x << "\n";
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Increment / decrement (x++, ++x...) not producing expected output

    Why doesn't the code (2) below produce the same output as the code (1)? Let's say you entered "4" as input: (1) int x; cout << "enter integer: "; cin …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Run a loop with a spesific pattern

    I think you need use `left join` and make all calculations in SQL. Something like this: SELECT j.id ,j.journal_date ,j.balance ,COUNT(p.projection) -- calculate here FROM journals j LEFT JOIN projects …
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Run a loop with a spesific pattern

    Hello, I have been strugling with this for a while. Is it possible to create a loop that will make this function run automaticly. I want to type in how …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Comparing Codes

    The windows analogue to MC is FAR but not fully functionality of MC - need additional plugin for compare files
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Comparing Codes

    Installable on any of Linux distributions. Do not need decompress before install it - use command line e.g. `sudo dpkg -i path/to/archive.tar.xz` Usually I intall mc using direct comman line …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Comparing Codes

    That feature are available in MC - select files in to the left and right tab and then press and hold "Ctrl" and successively press "x", "d" or use Menu-tab: …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Comparing Codes

    Midnight commander
  • Member Avatar for AndrisP
    AndrisP

    Began Watching Comparing Codes

    Hello, I have two files with slightly different codes from two different programmer. Me and the other guy. And I would like to move part of the working feature from …
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in SQL Server delete data with linked Table ?

    ignore drop - I use it only in my test base before create tables
  • Member Avatar for AndrisP
    AndrisP

    Replied To a Post in Going to the next line

    when you set `header("Content-Type:text/plain");` or use it inside pre `echo '<pre>'.$content.'</pre>`;` then it should be work fine

The End.