
Stefano
Members-
Content Count
21 -
Joined
-
Last visited
Community Reputation
0 NeutralAbout Stefano
-
Rank
Newbie
- Birthday 03/19/1966
Previous Fields
-
Languages
PHP, Delphi, JSP, java, javascript
Contact Methods
-
Website URL
http://
-
ICQ
0
Profile Information
-
Location
Italy
-
Interests
PHP, Delphi, JSP, java, javascript, AJAX, CSS<br />Oracle, MySQL, PostgresSQL<br />Linux, Apache, Tomcat,
-
Sincerilly I don't whether phpmyadmin give you such a possibility to do that interactively, like access do. I usually manage differently:1) Just create a signle table, why not?2) Manage with triggers through by SQL rather then phpmyadminIf you think triggers can solve I'll replay and give you prices tips.
-
Consider also other things you're going to chose beside the server side language. As an example PHP can be insalled in both windws and linux, IIS and Apache, ASP only on Bill's stuff!!!
-
Two problems php and SQL: .........if (isset( $_POST["name"])){ $sql="INSERT INTO comments (name, comment) VALUES ('$name', '$comment')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } }.......mysql_query(DELETE FROM comments WHERE name = ""); is supposed to be mysql_query(DELETE FROM comments WHERE name is null);note: "" != null If you fix PHP you can omit the delete statment, and in any case such a statement should be an "after insert" trigger on DBMS side.hope it helps
-
You are right, but in case like that I have to try and debug by myself to understand what's wrong. The links you show up are interpreted first by php then mysql and finally by php again. Are sure the problem is on MySQL side? Have you tried such a query directly in MySQL monitor? Actually you can show up many links but that will be of no help!
-
don't worry, is very long time I left England, and it's very long time I don't use the noble language, so really, I was sure code was an uncountable noun and I was really surprised when I read "codes", not too an ironic comment That's right!!!
-
Actually mysql_query() is a "PHP" function, there's no way to use it outside PHP.better answer:mysql_query() is the mean through which instructions are passed to MYSQL.regards
-
codes?! I didn't know "code" was a countable word, therefore I improve my english, be patient with my english please!In that page there is not any SQL code!!!you will find SQL codes in the next page nested inside PHP code.All functions starting with suffix mysql_ are still PHP function oriented to initialize the connection between PHP and MySQL. By doing that SQL codes can be passed, since then on, to MySQL server through by php string.if (mysql_query("CREATE DATABASE my_db",$con))if (mysql_query(" : this is PHPCREATE DATABASE my_db : this is SQL nested but "CREATE DATABASE my_db" (quoted) is
-
whenever you need to retrive or manipulate data stored in a database.Concerning on service based on server scripting (php), client scripting (js) and Db (MySQL, postgresql, Oracle,...) sql can code can be implemented in all of those parts.in javascript (very riskful for haking attack) to be passed to an asyncronus service;in the DB as stored procedure or trigger;in PHP to perorm operation on database according to request activity.Actually sql has not (usually) its own dedicated file, usually is inserted in the php code and passed as text string i.e. <?php$dbhost = 'host';$dbusername = 'root
-
update table set col=concat( substr(col,1,instr(col,' is ')-1), ' is not ', substr(col,instr(col,' is ')+4, length(col)-(instr(col,' is ')+3)) )where col like '% is %'and col not like '% is not %' (very important, otherwise you will get things like "is not not" whether you do PHP o SQL) I didn't tested, & since it's manipulation query test it on a copy a part first, or better, try the same expression with a select statment.there are good reasons, like performance, safety, control, code and work saving, code reuse for different servic
-
the conversion is lossy because the mapping is not one-to-one in both directionsHave a look herehttp://dev.mysql.com/doc/refman/5.1/en/dat..._unix-timestamp& let me know
-
May be becouse it's a "group by" expression therefore returned values which are repeted are aggregated in one row!!!omit "group by week" or add "count(*)", in the "select" side.regardsstefano de boni
-
select ahno, apc, bhno, bpcfrom( select a.hno as ahno, a.pc as apc, b.hno as bhno, b.pc as bpc from ( select rowno, hno, pc from yourtable) as a, ( select rowno, hno, pc from yourtable) as b where a.rowno mod 2 = 0 and b.rown mod 2 = 1 and (a.rowno-1)=b.rowno) I haven't debuged it let me know if helpsregardsStefano De Boni
-
select ahno, apc, bhno, bpcfrom( select a.hno as ahno, a.pc as apc, b.hno as bhno, b.pc as bpc from ( select rowno, hno, pc from yourtable) as a, ( select rowno, hno, pc from yourtable) as b where a.rowno mod 2 = 0 and b.rown mod 2 = 1 and (a.rowno-1)=b.rowno) I haven't debuged it let me know if helpsregardsStefano De Boni
-
select id, game_id, datum, aantalfrom imagesorder by datum desclimit 10 I don't know whether I've understood your request, is this the solution?regardsstefano De Boni
-
As for me is not a count issue!!!The following works with mysql, if you use oracle use "decode" function in stead of "if()" function, anything else let me knowSELECT sum( num )FROM (SELECT if( TOAC LIKE '01%', +1, -1 ) AS numFROM TELCO_CALLS) AS aname regardsstefano De Boni