khunjack
Members-
Posts
17 -
Joined
-
Last visited
Everything posted by khunjack
-
mysqli_stmt_get_result, problem, config issue ?
khunjack replied to khunjack's topic in PHP Installation and Configuration
mac_gyver,Jacques1 Thanks to you both for your replies and help. Very appreciated (What a great board). Made me find a routine. I just checked and got - MySQL is installed. - MySQLi is installed. - libmysqlclient driver is being used. - PDO MySQLnd is enabled. Seems I will be ok using PDO I used : -
mysqli_stmt_get_result, problem, config issue ?
khunjack replied to khunjack's topic in PHP Installation and Configuration
Jacques1, Thank you very much for your fast reply. I understand the external server management company I use, (not my host/server company) explanation is misleading. Do you see a way for me to see, if it is disabled and to enable the native driver ? Thanks a lot. Jack PS: I wasn't sure if for new dev. I would use mysqli or PDO. I will go for PDO. PS: I'm a little bit reluctant to tell them. They just tried to upgrade to Easyapache 4 which didn't work with mod_php and all sites on this server where not accessible for nearly 24 hrs. -
Hi, Using a new external script and I'm getting the following error: Fatal error: Call to undefined function mysqli_stmt_get_result() in /home/.... According to the script developer, an host issue. I asked my server management company and they came back with this answer: Note: o currently I need to stick with mod_php and php 5.4.45 o According to phpinfo: mysql, mysqli, mysqlnd is installed. If it is correct that "mysqli_stmt_get_result" is only avaialble till php 5.3? Any suggestion how to tackle this issue? Thanks a lot in advance Jack
-
blob image - rotate image - save in mysql again - How to ???
khunjack replied to khunjack's topic in PHP Coding Help
Mchl, Thank you for your reply. $aRow = $this->getPicture($sPicId); . $src = @imagecreatefromstring ($aRow["Bin Data"]); $image = imagecreatetruecolor (...); imagecopyresampled (...); . . $rotate = imagerotate($image, $degrees, 0) ; imagejpeg($rotate, $imagename2) ; now I have the rotated pic in '$imagename2' in the server root Up to now could not manage to store the rotated image back into mysql. Tried a few things, honestly I don't have a glue, e.g. stored the $rotate, $imagename2 in the blob ["Bin Data"] field... etc... Thank you Jack -
blob image - rotate image - save in mysql again - How to ???
khunjack replied to khunjack's topic in PHP Coding Help
PS: The image is on the server root .... the issue is to store it back into mysql Thanks -
Dears, I have images in mysql (blob). Some of the images need to be rotated (90 degrees). Not sure how to do it. Do I have to physical write the image? (I did that and was using 'imagerotate' -> image rotated, but couldn't manage to store the rotated images back into mysql.) Can the blob be rotated?? Any hints/suggestions are very welcome. Thanks a lot Jack
-
[SOLVED] 2 tables (I-M) count only one time? thks
khunjack replied to khunjack's topic in MySQL Help
I'm puzzled .... made it very simple SELECT COUNT(DISTINCT accounts.account_id) FROM kj_accounts accounts JOIN kj_stats_sys_notification sysnotify ON (accounts.account_id=sysnotify.account_id) and it seems to work fine I tried that already earlier but without the 'DISTINCT ' It helped big time pointing that out. Guys was great that you responded so fast to my help request. Thanks a lot. -
[SOLVED] 2 tables (I-M) count only one time? thks
khunjack replied to khunjack's topic in MySQL Help
BTW: I need that count for paging (total record #). to get the actual entries in table 2 (counting how many sysnotification that id got) seems to work SELECT COUNT(sysnotify.sender_site) AS mail_cnt, accounts.account_id, account_screenname FROM kj_accounts accounts RIGHT JOIN kj_stats_sys_notification sysnotify ON (accounts.account_id=sysnotify.account_id) GROUP BY accounts.account_id ORDER BY mail_cnt desc, created_dt desc LIMIT 0, 10 I need the count for that, sure I think the work around would be using above without LIMIT and doing an count($aResult) wouldn't fit into all my other routines .... drives me nuts -
[SOLVED] 2 tables (I-M) count only one time? thks
khunjack replied to khunjack's topic in MySQL Help
Thanks a lot again .... all make so much sense, when I look at it ...but Result (for both): 1 used: SELECT COUNT(DISTINCT accounts.account_id) AS number_of_rows FROM kj_accounts accounts left JOIN kj_stats_sys_notification sysnotify ON (accounts.account_id=sysnotify.account_id) WHERE sysnotify.account_id is not null GROUP BY accounts.account_id and SELECT COUNT(DISTINCT accounts.account_id) AS number_of_rows FROM kj_accounts accounts JOIN kj_stats_sys_notification sysnotify ON (accounts.account_id=sysnotify.account_id) GROUP BY accounts.account_id ..thanks ..thanks for any other ideas ... so much appreciated -
[SOLVED] 2 tables (I-M) count only one time? thks
khunjack replied to khunjack's topic in MySQL Help
Thanks a lot toplat and colldude832 I tried the first eaxample from toplay as SELECT COUNT(accounts.account_id) AS number_of_rows FROM kj_accounts accounts left JOIN kj_stats_sys_notification sysnotify ON (accounts.account_id=sysnotify.account_id) WHERE sysnotify.account_id is not null Result: 261 (I'm expecting 126) table1 : accounts (158 records) table2: sysnotify (261) tried cooldude832 suggestion as Select IF(COUNT(sysnotify.account_id) >= '6') accounts.account_id AS account_id from kj_stats_sys_notification sysnotify, kj_accounts accounts that brings an syntax 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 ') accounts.account_id AS account_id from kj_stats_sys_notification sysnotify, kj' at line 1 Thanks so far a lot for your help -
Dears, as longer I'm trying as more I get confused. I have 2 tables table 1 has records with 'account id' unique (only once) table 2 has 'account it' multiple times (one to many relationship) I want just counting the recs in table 1 which having one or many records in table 2 The wished result is: count only one when 'account id' exist in table 2 ( even when table 2 has e.g. 10 records with the 'account id' from table 1) Dazed and confused ..... Any help/hint is highly appreciated - Thanks a lot in advance
-
[SOLVED] An array in the where clause - possible?
khunjack replied to khunjack's topic in MySQL Help
Barand, fantastic!!! Thank you very much for your straight forward solution .. big time appreciated. Jack -
Hi, I'll have a session array with growing numbers of id's. array = (2222,4444,32323,...} The records with these id's need to be excluded ... e.. ' .... id!=2222 and id!= 4444 ' Sure could build this querey via a loop. Question: Is there a better/shorter way in the WHERE Clause ??? ??? WHERE id!={array} ... ??? Thanks for every feedback Jack
-
Hi, I try to display Thai on my page. e.g (แจ็ค) but in the html .. it looks like the following ( 3649; 3592;& #3655;& #3588;) (I put blanks in it here..to show) is there any other way ...that I could type that like (แจ็ค) in the html. What do I need to do that it will not displayed like '????????' for the user. Thanks a lot - a little bit confused Kindest regards Jack
-
What do I do wrong. I use charset=utf-8 or charset=tis-620 or windows-874. I copy the Thai text into the page ... can see it perfectly - store the page. Call via a Browser ... all "???????????????????". Open it up with Dreamweaver ... now also "???????????????????". What do I do wrong .. what do I need to do to create a page in Thai LAnguage Thanks a lot for your help .. Highly appreciated. Jack (แจ็ค)
-
foreign language display
khunjack replied to khunjack's topic in Editor Help (PhpStorm, VS Code, etc)
Thanks Leslie for the pointer. the following looks good in Dreamweaver, but it doesn't display it (the Thai) correct when I view it IE 6. Cn somebody give me a hint .. Highly appriacted!! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text-html; charset=utf-8"> <style type="text/css"> .thai {font-family:"Cordia New",Ayuthaya,Tahoma,"Arial Unicode MS";} </style> </head> <body> <p></p>Latin text followed by <span class="thai" lang="th">สารบัญเว็บไทย</span> and more Latin text.</p> </body> </html> -
I need to retrieve and store text in a foreign languages e.g. Thai. Can I create the pages with Dreamweaver? Storing "Thai text" in mysql using PHP ... ? This is new to me ..would appreciate if somebody can give me a hint or point me in the right direction. Thanks a lot. Jack