select field from another database

Questionsselect field from another database
Cristi Gradinaru asked 8 years ago


I have 2 databases:
categ_sfaturi [id(autoincrement), nume_categorie(varchar)]
sfaturi [id(autoincrement), categorie(varchar), sfat(varchar)]

I need to display a table using sfaturi db where in add / edit dialog the field categorie is select type and displays the values of nume_categorie from categ_sfaturi database.

I tried to use the dropdown-dependent.php as sample but it seems that I'm doing something wrong. Any suggestions?

PS: i'm using the paid version of phpgrid.


4 Answers
Cristi Gradinaru answered 8 years ago

I have solved the problem.

I do have one more question, though:
is it possible to have a scroll bar inside a field?
I have a character field in a db and it contains some large texts. When I display the grid those fields make the table look bad…

Abu Ghufran answered 8 years ago

You can try using textarea for input field.

$col["edittype"] = "textarea";

If issue persist, Please share some screenshot of the issue.

Cristi Gradinaru answered 8 years ago

Hi Abu,

Thanks for your feedback.
The problem is not in edit form, but when I display the grid.
Here is a printscreen:

Abu Ghufran answered 8 years ago

You can use 'readmore' plugin that collapse long text and expand on readmore click.
Sample integration code:

Your Answer

0 + 2 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?