get multilevel child hierarchy in mysql query
I have a table like this.i want all child hierarchy by the MySQL query
See also questions close to this topic
PHP MySQL server for C# application (406 not acceptable)
I am trying to setup a PHP site to handle the connection to a MySQl database for a C# application. But I can't get the communication between the C# application and the PHP site to work. I always get an "406 Not acceptable" error.
Here is the code from PHP.
<?php header("Content-type: text/plain"); echo "test"; ?>
Here is the C# part.
var request = (HttpWebRequest)WebRequest.Create("http://manoest.dk/UpdateValue.php"); request.Accept = "text/plain"; var test = request.GetResponse(); //WebClient client = new WebClient(); //client.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"); //string test = client.DownloadString("http://manoest.dk/UpdateValue.php");
I am pretty experienced in C#, but completely new to PHP. Hope that you can help me out.
Create Insert function
Can anyone please tell me where i'm wrong at
CREATE OR REPLACE FUNCTION ttestt (url varchar(255)) RETURNS VOID AS BEGIN DECLARE @IMAGE_ID INT INSERT INTO images(url,ajoute_par) VALUES ("http://www.example.com","3") SET @IMAGE_ID = SCOPE_IDENTITY() INSERT INTO Dossier(nom, etat, dossierImage) VALUES ('NameTest', 1, @IMAGE_ID) END
I'm getting this error :
#1064 - 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 'FUNCTION ttestt (url varchar(255)) RETURNS VOID AS BEGIN DECLARE @IMAGE_ID' at line 1
How do I import Subscript and Superscript from an excel file to mySQL Database?
We have a lot of chemistry MCQs in an excel file with lot of chemistry formulas and equations. When we tried to import these MCQs into mySQL based database all subscripts used in formulas lost and taken as normal character e.g, H2SO4, CO2, CH3 etc and makes our formulas and elements name nonsense. Is there any solution by which mySQL can import subscript and superscript as it is from excel? Or Is there any solution so we can force excel to consider subscript and superscript as inserted symbols because mySQL can pick symbols as it is?