Re: mysql-native Help required

2020-10-25 Thread Vino via Digitalmars-d-learn
On Friday, 23 October 2020 at 20:28:40 UTC, aberba wrote: On Thursday, 22 October 2020 at 18:43:40 UTC, Steven Schveighoffer wrote: [...] Was about to say that. Part of why I think some people hate OOP...due to misuse. All my MySQL projects have this getConnection() function. Hi All,

Re: mysql-native Help required

2020-10-23 Thread aberba via Digitalmars-d-learn
On Thursday, 22 October 2020 at 18:43:40 UTC, Steven Schveighoffer wrote: On 10/22/20 11:00 AM, Vino wrote: [...] Different error: Row[] data = conn.query("SELECT * FROM hostlog").array; This is trying to call mysql-native's UFCS query function on Connections, which isn't valid. You need

Re: mysql-native Help required

2020-10-22 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/22/20 11:00 AM, Vino wrote: On Thursday, 22 October 2020 at 14:08:30 UTC, Steven Schveighoffer wrote: On 10/22/20 7:04 AM, Vino wrote: Hi All,    Request your help on the below code as it is not working as expected. GetConnections.d module common.GetConnections; import mysql; class

Re: mysql-native Help required

2020-10-22 Thread Vino via Digitalmars-d-learn
On Thursday, 22 October 2020 at 14:08:30 UTC, Steven Schveighoffer wrote: On 10/22/20 7:04 AM, Vino wrote: Hi All,   Request your help on the below code as it is not working as expected. GetConnections.d module common.GetConnections; import mysql; class Connections {   private

Re: mysql-native Help required

2020-10-22 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/22/20 7:04 AM, Vino wrote: Hi All,   Request your help on the below code as it is not working as expected. GetConnections.d module common.GetConnections; import mysql; class Connections {   private Connection conn;   auto constr =

Re: mysql-native Help required

2020-10-22 Thread novice3 via Digitalmars-d-learn
On Thursday, 22 October 2020 at 11:04:53 UTC, Vino wrote: class Connections { private Connection conn; auto constr = "host=localhost;port=3910;user=user;pwd=password#;db=testdb"; this.conn = new Connection(constr); } where Connections class constructor implemented?

mysql-native Help required

2020-10-22 Thread Vino via Digitalmars-d-learn
Hi All, Request your help on the below code as it is not working as expected. GetConnections.d module common.GetConnections; import mysql; class Connections { private Connection conn; auto constr = "host=localhost;port=3910;user=user;pwd=password#;db=testdb"; this.conn = new