[Solved] mysql reporting syntax error

Put your query with quotes: $query = “INSERT INTO historial(`titulo_his`, `autor_his`, `editorial_his`, `isbn_his`, `color_his`, `fecha_inicio_his`, `fecha_final_his`, `idusuarios_his`, `codlibros_his`) VALUES(‘{$tit}’, ‘{$aut}’, ‘{$edit}’, ‘{$isbn}’, ‘{$color}’, ‘{$fechaP}’, ‘{$fecha}’, ‘{$_SESSION[‘idusuarios’]}’, ‘{$libro}’)”; The problem is that you are trying to insert strings without enclosing them into quotes, so the query will fail PS: And don’t use mysql_* functions the extension … Read more

[Solved] Get PHP associative array from MySQL

Use mysql_fetch_assoc instead of mysql_fetch_row. GetRowFromDb(“`id`,`name`,`email`”, ” WHERE `id`=’1′”, “database1”, “table1″); function GetRowFromDb ($column, $condition, $database, $table) { $target=”`$database`.`$table`”; $query=”SELECT $column FROM $target $condition”; $indexedrow=mysql_fetch_assoc(mysql_query($query)); return $indexedrow; } solved Get PHP associative array from MySQL

[Solved] How To replace Space by ‘+’ sign using javascript

“demo” is not an id that exists in your example. Also, I’m fairly certain you are trying to use php as javascript in there. <a id=’demo’ href=””>is you good</a> <script> const spaceToPlus = (content) => { return content.replace(/ /g, ‘+’); } let anchor = document.getElementById(‘demo’) let attributeHref = spaceToPlus(anchor.innerHTML); anchor.setAttribute(‘href’, attributeHref); </script> 0 solved How … Read more

[Solved] Sort highest to lowest without built in [closed]

I dunno why one would do it without built-in functions, but here’s a working bubble sort example. http://rosettacode.org/wiki/Sorting_algorithms/Bubble_sort#Python def bubble_sort(seq): “””Inefficiently sort the mutable sequence (list) in place. seq MUST BE A MUTABLE SEQUENCE. As with list.sort() and random.shuffle this does NOT return “”” changed = True while changed: changed = False for i in … Read more

[Solved] Disable an element/class/id from append? [closed]

Sure — add the attribute canAppend=”no” to an element then use the attribute selector like this: $(document).ready(function() { /* add the attribute selector [canAppend!=”no”] to your select or */ $(“div[canAppend!=’no’]”).append(” appended content here”); }); div { border: 2px solid black } <!– regular divs that dont have the noAppend attribute –> <div>div 1</div> <div> div … Read more

[Solved] What is this called in Android?

That screens calls intro screens. that using viewpager if you want to first time when application is installed. The you have manage boolean flag when application is installed using sharedpreferences. check at the splash screen every time. solved What is this called in Android?

[Solved] array value by jQuery

$(document).ready(function(){ var arr = [“2″,”4″,”6″,”8″,”10”]; var index = [“1″,”5″,”9″]; var arrIndex = index.map(function(value){ return arr.indexOf(value); }) console.log(arrIndex); }) <script src=”https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js”></script> 1 solved array value by jQuery

[Solved] Oracle database multiple row -> c# [closed]

Let’s brush up your code: // Extract methods, don’t cram everything in OnClick private void FeedFriendsListBox() { string oracleDb = @”connection string”; //DONE: wrap IDisposable into using using (OracleConnection conn = new OracleConnection(oracleDb)) { conn.Open(); //DONE: Make Sql readable – format it out and use names for the parameter(s) string sql = @”SELECT NAME, ADDRESS … Read more

[Solved] can’t understand where is syntax error [closed]

1) scanf(“%s”,input) and not scanf(“%s”,&input) input holds the address of the array. &input passes the address of input. 2) Syntax of for loop is: for ( init; condition; increment ) { //code } Hence the for loop should be: for(i=0,j=c-1;i<=j && j>=0;i++,j–) 6 solved can’t understand where is syntax error [closed]

[Solved] GetOption PERL to Python

There is a module in python called argparse. You can use the module to solve your problem. Code example : test.py import argparse import os commandLineArgumentParser = argparse.ArgumentParser() commandLineArgumentParser.add_argument(“-fname”, “–fname”, help=”first name”) commandLineArgumentParser.add_argument(“-lname”,”–lname”, help=”last name”) commandLineArguments = commandLineArgumentParser.parse_args() fname = commandLineArguments.fname lname = commandLineArguments.lname print “%s\n%s” %(fname,lname) Run example python test.py -fname ms -lname = … Read more

[Solved] Issue with my website url [closed]

You need to move the home.html file in to the start directory, in other words not in any folders or just out of the OBI1.0 folder, and rename it index.html. Then you can go to obiventures.com / http://obiventures.com / http://obiventures.com/ and it will be there. Oh, and nice website by the way. 0 solved Issue … Read more