ddeveloper

ddeveloper supports this item

Supported

37 comments found.

Hi!

I need to know how to close and reset all the database connections. Thanls!

Hi,

There is no connection close method in PDO. It is not required unless you explicitly want to do same. To do, just set your PDO object to false.

Please refer below stackoverflow question for more details.

http://stackoverflow.com/questions/15444748/is-it-necessary-to-close-pdo-connections

AGAIN, how order by rand () – i m still waiting for this answer – thanks.

Hi, for order by rand() to work, a small change will be required. You need to set backtick = ”” in the PDOModel.php file.I can send you file after required change if you want. Thanks

Hi, $pdomodel->where(“user_id”, $array, “IN”); NOT work….

how i can user WHERE IN

thanks

Dont works for me

first, the query return like this select * from post where empIDIN – the IN gets together with the empID so i used to put a space ” IN” but still wont work for me, can you check with a big array?

Also check with a big array

Hi, I have checked it is working fine at my end. Please contact via profile. I will send you my copy of file again. Thanks

Dude, or i m crazy or it have alot of errors.

$pdomodel->where("Post_Id",$id,'<>'); $pdomodel->where("Post_Status",0); $pdomodel->openBrackets = "("; $pdomodel->where('Post_Cat',1); $pdomodel->andOrOperator = "OR"; $pdomodel->where('Post_Cat',2); $pdomodel->closedBrackets = ")"; $pdomodel->orderByCols = array("rand()"); $pdomodel->limit = "0,1"; $result = $pdomodel->select("posts");

this code was supost to return

Select * from posts where Post_Id <> ? AND Post_Status = 0  AND (Post_Cat = 1 OR Post_Cat = 2)

But this return

Select * from posts where Post_Id <> ? OR Post_Status = 0  OR (Post_Cat = 1 OR Post_Cat = 2)

What i m doing wrong?

hi,

I have used same code as you have sent me and it is generating me proper query

SELECT * FROM `posts` WHERE `Post_Id`<> ? AND `Post_Status`= ? AND ( `Post_Cat`= ? OR `Post_Cat`= ? ) ORDER BY `rand()` LIMIT 0,1 I think you have set the default value of andOrOperator = “or”. Please check andOrOperator ="or" instead of the andOrOperator ="and"

Please check.

i never have set the default operator. if you plan a update maybe create

$pdomodel->where(x=y); $pdomodel->and_where(x>y); $pdomodel->or_where(x<y);

select from aaa where x=y and x>y or x<y;

It has this functionality but it is done in another way. using the andoroperation setting. Thanks

Hi how i can use SUM ?? about the WHERE IN i have send you a email, but you still dont answer me. thanks

Hi,

I haven’t received your email. Please send me again using my profile. I will reply you immediately. Thanks

i sent again, waiting for your answer

Hi, I have replied to your email. Please check. Thanks

Look a this

//$row['Todo_Id'] returns 1,2,3

// works just fine
 $res =  $pdomodel->executeQuery("select * from users where id IN (".$row['Todo_Id'].")");

// dont work

 $pdomodel->where('id',array($row['Todo_Id']),'IN');
 $res =  $pdomodel->select("users");

 $pdomodel->where('id',$row['Todo_Id'],'IN');
 $res =  $pdomodel->select("users");

I have no idea what is wrong

Hi,

As you mentioned

//$row['Todo_Id'] returns 1,2,3

it is not array, it became one single element “1,2,3” so correct code

$data = explode(",". $row['Todo_Id']); $pdomodel->where('id',$data,'IN');

Thanks

I’m trying to loop through the results with :

while($rs = mysql_fetch_assoc($result))

But I’m getting: Warning: mysql_fetch_array() expects parameter 1 to be resource

It’s returning 2 when I use the $pdomodel->totalRows but for some reason I can’t loop the result.

Can you help me?

Hi, it is not showing purchased with your profile. You need to provide purchase code before I can provide support.

Here’s my question again in the right profile:

I’m trying to loop through the results with :

while($rs = mysql_fetch_assoc($result))

But I’m getting: Warning: mysql_fetch_array() expects parameter 1 to be resource

It’s returning 2 when I use the $pdomodel->totalRows but for some reason I can’t loop the result.

Can you help me?

Hi,

The result return is array not mysql result object. It works with PDO and returns data as array format.and you can read array data as any array you read in PHP.

foreach($result as $row){ $user_name = $row[“user_name”];//to get it in variable echo $user_name;//echo variable }

Thanks

Hmmm ok, I got it! Thanks

Hello, I am looking to design a website similar to expireddomains.net. Is your script useful to achieve me that functionality? Let me explain you what exactly I am trying to do. I have a affiliate account with CJ.com and I want to promote GoDaddy domains. GoDaddy offer free list of domains in .csv file which is updated everyday. That csv files contains over 300,000 domains. I am looking to upload .csv file everyday in my website and display in my website with datagrids. (Just like expireddomains.net) do. I would also like advance search and apply search filters to list related to domains. Use the link below to see what type of csv I want to work with… https://www.sendspace.com/file/9ixj3t Also I would like to know how can I apply my affiliate link at CSV file or within your system.

Hi, I have replied to your same message in other thread. Please check. Thanks

mrx02de

mrx02de Purchased

Hi ddeveloper,

is there a way for select distinct. I would like to exclude duplicate results. How does this work with the pagination in a query? Please specify a sample code. Thanks! This is a nice PHP class.

Hi,

For that you need to use execute query function. Please make sure to set $this->backticks = ”” ; (Empty) before using any sql function like select, count etc.

Regarding pagination, you can pass total records generated and current page to generate the pagination code.

Thanks

Pre Purchase Questions. I am wanting to use this specifically for Export as a PDF. Will the export to PDF option automatically run or would end user need to run it?

I need to name the PDF from a fields in database. Is there a way to modify the $fileName so it outputs like below example.

firstname = John lastname = Smith

john_smith.pdf

Thank You

Hi

Not possible with this script. Thanks

Hi, I have a software property management system develop in cake php, I want my admin panel have backup section and when I click on that it will export database into mysql, cakephp version is I think 2014, can this do that ? Will it export all database or can be a specific table. Thanks.

Plus will it automatically store in google drive ?

Thanks

Thankyou for super quick response.. Any idea where can I get mentioned script ?

Sorry, I don’t have idea about that. Thanks

can we used in MSSQL Database & vb.net

Hi,

1. Current version doesn’t support MSSQL, we are working on next version that will have MSSQL support. 2. It is php based script so can’t be run using vb.net. You can create rest api to pass data using this.

Thanks

ipagewww

ipagewww Purchased

How use SUM ? couple months ago you said you was making a update, still nothing?

Hi,

over last 2 months, I have released many updates with many features. I am still adding some more features, I will add this also. Thanks

ipagewww

ipagewww Purchased

here say last update was in May, did you released something last 2 months?

I have replied about the SUM function on your email.

Yesterday, I have uploaded a new version with sql server connection. It will be available once reviewed by the codecanyon team.

Thanks

Sorry but pagination works but does not work the link to select the different pages, mistake anything?

Hi,

You need to write code to get data as per pagination. Pagination just generates link, rest you need to do. Thanks

OK, you just know, practically throws the numbers, but the javascript that shows the number and the next does not produce any action, what’s the point then?

It’s basically generate the selected page link, required no. of pages links etc. Rest needs to be done as it’s just a database abstraction script. These task needs to be done separately. Thanks

I see you just updated this item. What is new?

PDOModel now supports SQL Server along with PGSQL, SQLite and Mysql.

I have updated details also on file description.

Please how do I do this using your code:

$sql = “INSERT INTO tbl_loan(loanid,full_name,cifno,appdate,purpose_of_loan,amount_required,collateral_value,tenure,home_verification_done) VALUES ON DUPLICATE KEY UPDATE full_name= VALUES , cifno= VALUES , appdate= VALUES , purpose_of_loan= VALUES , amount_required= VALUES , collateral_value= VALUES , tenure= VALUES , home_verification_done= VALUES ”;

Thanks

That does not answer my question. I want to insert into a table (the link answers that) and ON DUPLICATE KEY UPDATE some column. Please check my question again. Thanks

Hi,

For this, you need to use execute query function. Thanks

by
by
by
by
by
by