2006/11/10 8:30
ibetino
Just popping in
Posts: 1
Since: 2006/11/10
<FORM ACTION="SEARCH.PHP" METHOD="POST"> Input a code: <INPUT NAME="code"><INPUT TYPE="submit"> FORM>
include("CONECTION.PHP"); include("FUNC.PHP"); $sql = "SELECT * FROM xoops_tablecodes WHERE code = '$code'"; If ($res=send_sql($db,$sql)) { echo "OK. Results: "; } tab_out($res);
$link=mysql_connect("localhost","user","passw"); $db ="Database name";
function send_sql($db, $sql) { if (! $res=mysql_db_query($db, $sql)) { echo mysql_error(); exit; } return $res; } function tab_out($result) { $cant=mysql_num_fields($result); $ancho=100/$cant."%"; echo ""; echo ""; for ($i=0;$i<$cant;$i++) { echo "$ancho'> "; echo mysql_field_name($result,$i); echo " "; } echo ""; echo ""; $num = mysql_num_rows($result); for ($j = 0; $j < $num; $j++) { $row = mysql_fetch_array($result); echo ""; echo ""; for ($k=0;$k<$cant;$k++) { $fn=mysql_field_name($result,$k); echo " $ancho'> $row[$fn] " ; } echo ""; echo ""; } echo ""; } I need to do this in XOOPS and using de xoopsdatabase!!!!Thanks and sorry by my english!!! 2 Re: How to access a xoopsDatabase 2006/11/22 12:44 hervet Friend of XOOPS Posts: 2267 Since: 2003/11/4 Hello,the minimum, in your php script, is to write this : include_once '../../mainfile.php'; ?> use the search of this site and try to find the "empty module". Login Username Password Remember me Reset Search Advanced Search Recent Posts XOOPS MyMenus 1.54.0 Beta 10 11/18 11:08 Mamba Re: XOOPS MyMenus 1.54.0 Beta 7 11/18 11:06 Mamba Re: XOOPS MyMenus 1.54.0 Beta 7 11/16 12:32 liomj Re: XOOPS MyMenus 1.54.0 Beta 7 11/15 18:06 Mamba Re: XOOPS MyMenus 1.54.0 Beta 7 11/15 5:33 liomj Re: XOOPS MyMenus 1.54.0 Beta 7 11/15 5:29 liomj Re: XOOPS MyMenus 1.54.0 Beta 7 11/15 4:39 Mamba Re: XOOPS MyMenus 1.54.0 Beta 7 11/15 3:50 liomj Re: XOOPS MyMenus 1.54.0 Beta 7 11/15 3:31 Mamba Re: XOOPS MyMenus 1.54.0 Beta 7 11/15 1:48 Mamba Who's Online 335 user(s) are online (271 user(s) are browsing Support Forums) Members: 0 Guests: 335 more... Donat-O-Meter Stats Goal: $100.00 Due Date: Nov 30 Gross Amount: $0.00 Net Balance: $0.00 Left to go: $100.00 Latest GitHub Commits {{ record.sha.slice(0, 7) }} - {{ record.commit.message | truncate }} {{ record.commit.author.name }} {{ record.commit.author.date | formatDate }}
2006/11/22 12:44
hervet
Friend of XOOPS
Posts: 2267
Since: 2003/11/4
include_once '../../mainfile.php'; ?>
Advanced Search
335 user(s) are online (271 user(s) are browsing Support Forums)
Members: 0
Guests: 335