Solved

PHP inside <script>

Posted on 2006-11-23
2
1,092 Views
Last Modified: 2008-01-09
Hi,

Please assist how can we insert the number of rows returned from mysql into the varaiable myCells.

Thanks.

<script>
var myCells = [
["Test1","Ok"],
["Test2","<?PHP echo mysq_row_count($datasetTest); ?>"]   <-----------error
];

.....

</script>
0
Comment
Question by:FrankPorter
2 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
Comment Utility
><-----------error
what error?

now:
>mysq_row_count
looks like you have a typo, ie a "l" missing:
mysql_row_count

if that doesn't help, can you show the code that created the $datasetTest?
possibly, the query is not correct.
0
 

Author Comment

by:FrankPorter
Comment Utility
should be mysql_num_rows
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now